upgrade.ensure_ignored()

Make sure .tether/.gitignore lists every per-workspace file.

Usage

Source

upgrade.ensure_ignored(
    root,
    *,
    only_present=False,
)

jj snapshots anything not ignored into the working-copy commit, so a new untracked file (the op log, say) must be ignored before it first appears. With only_present, entries are added only for untracked files that exist and are not yet ignored – the check a read-only command runs, so it writes nothing in the steady state but never lets secrets.toml reach a commit.