fix(git,search): repair the regressions the last round introduced
`git diff <pathspec>` died outright: the stat header spliced `--no-patch --stat` at the `--` boundary, which is args.len() when there is none, so git saw an option after a non-option argument and refused the whole command. The insert point now stops at the first positional too -- a git rule, not a shared one, so it lives in git.rs rather than being forced on dotnet, whose own test caught me doing exactly that. That same header overrode flags whose entire job is to suppress the diff body: `git diff --check` reported a diffstat and exit 0 where git reports whitespace errors and exit 2. `--check`/`-s`/`--no-patch` now take the passthrough path, which in turn had to stop discarding stdout on a non-zero exit -- `--check` prints its report and *then* exits 2. Three more from the same batch: stripping `--no-compact` by a single index leaked the second copy of a repeated flag to git; ignoring `--` only when it was the sole token dropped `git status -sb --` off the compact path; and `git worktree -- add x` answered with a worktree list where real git errors. `paths.is_empty()` meant "the engine walked the cwd" for rg but "read stdin" for grep, so grep prefixed every match with `(standard input):` whenever stdin was a terminal. The new stdin tests also guard on the engine they drive, the convention the other search integration tests document. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
N
Nicolas Le Cam committed
056c3919290622191f61e67cf8724d4e5cc99d82
Parent: 6690142