]> git.ipfire.org Git - thirdparty/git.git/commit
status tests: filter `.gitconfig` from status output
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 26 Apr 2026 14:38:35 +0000 (14:38 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Apr 2026 05:50:54 +0000 (14:50 +0900)
commita09d2b27ff9331d03a629b5ffcf81cb16bbe6544
tree8b7910143710126502dbe89dd174c0eddc0a40bf
parent83228f16611eae979421915836c5416eb4d02cf3
status tests: filter `.gitconfig` from status output

Since test-lib.sh creates `$HOME/.gitconfig` when
`WITH_BREAKING_CHANGES` is in effect, the file appears in `git
status` output as either untracked (`?? .gitconfig`) or ignored
(`!! .gitconfig` / `! .gitconfig`, depending on porcelain version),
because the `.git/info/exclude` entry causes git to treat it as an
ignored file rather than hiding it entirely.

In t7061 and t7521, which are pervasively affected, introduce a
`filter_gitconfig` helper that strips all status-prefix variants of
`.gitconfig` from the output before comparison. In the remaining
scripts (t7060, t7064, t7508), apply targeted adjustments.

Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7060-wtstatus.sh
t/t7061-wtstatus-ignore.sh
t/t7064-wtstatus-pv2.sh
t/t7508-status.sh
t/t7521-ignored-mode.sh