pub fn spawn_gitignore(workdir: PathBuf, pattern: String) -> EffectExpand description
MG.23c1: append pattern to the repository’s .gitignore.
Not a git command — git has no “add to gitignore” subcommand, so
this is a file append, done on spawn_blocking like every other
blocking call in this crate.
Skips a pattern already present, comparing whole trimmed lines.
Ignoring the same path twice is harmless to git but grows the file
and makes it harder to read, and the user pressing i twice on the
same build artefact is an ordinary mistake rather than an intent to
duplicate.