fix(git,search,go): drop the header's rival flags instead of outranking them
The insert point added last round tried to place RTK's `--no-patch --stat` where it would win git's last-one-wins rule. It could not: git accepts options after a revision, so `git diff HEAD~1 -p` still outranked it, and splicing at the first free positional broke two other things. `rtk git diff -pl 100` died with `fatal: ambiguous argument '100'` because every short flag in a cluster shares one source_index, so dropping the arg took `-l` with it; and `rtk git diff --max-age N` died with `fatal: '--no-patch': not a number of seconds since epoch`, because a value-taking flag missing from the table left its value looking like a positional and RTK spliced its own flags in between. So the header goes back in front, and the user's patch-shape flags are removed from it instead -- rebuilt per token, so `-pl 100` keeps its `-l`. With nothing left to outrank, position stops mattering and a gap in the table is harmless again. `--max-age`/`--min-age` are added regardless, and the insert point is gone. `git show -s` printed the diffstat it exists to suppress: run_show never consulted suppresses_diff_body, and moving RTK's `--stat` in front let it win. It now prints the summary and stops, as git does. golangci: only a sink pointing at **stdout** collides with RTK's own, so `--output.text.path /tmp/report.txt` gets RTK's JSON injected alongside it again rather than leaving nothing to parse. The nine sink names are enumerated rather than prefix-matched, per this PR's own rule 6. search: `-h`/`--no-filename` is honoured when printing instead of being forwarded -- as the later flag it beat RTK's forced `-H`, every line failed the NUL parse, and the entire search ran a second time (verified: one engine exec now, two before). A value-taking flag left without its value hands the command over untouched, so `grep --regexp` keeps its own "requires an argument" error instead of succeeding silently. And rg's `-A=1` is unwrapped where rg would unwrap it; GNU grep rejects that spelling, so its args are left alone. Refuted against a real .NET 9 SDK rather than changed: `dotnet test`'s `-r` is `--runtime`, not `--results-directory`, and `--`'s payload goes "to the application that is being run", so a forwarded `--logger trx` is not dotnet's logger and RTK still has to inject its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
N
Nicolas Le Cam committed
09075949787391c053d84ff31990bcad9979b3d9
Parent: 6fcd489