summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-04-26 14:38:34 +0000
committerJunio C Hamano <gitster@pobox.com>2026-04-27 14:50:53 +0900
commit83228f16611eae979421915836c5416eb4d02cf3 (patch)
tree77524598d89bae0e2ded1597535e82ad1f62cdd1 /git-commit-script
parentd97f27bf01a1ba2cfa66cc8e55f03e701084240e (diff)
ls-files tests: filter `.gitconfig` from `--others` output
The global `safe.bareRepository=all` setting in test-lib.sh is written to `$HOME/.gitconfig`, which unfortunately lives inside the test repository's working tree. The `.git/info/exclude` entry added alongside it handles most commands, but `git ls-files --others` without `--exclude-standard` does not consult `info/exclude` at all, so the file appears in the output. Ideally, each test that accesses a bare repository would simply specify `--git-dir` or `GIT_DIR` explicitly, which would require no global config and produce no side effects in the working tree. As that approach was not taken, filter `.gitconfig` from the output before comparing against expected results. In t7104, the test already uses `--exclude-standard`, so it suffices to switch from the bare `git ls-files -o` to `git ls-files -o --exclude-standard` which respects the `info/exclude` entry; the other tests deliberately omit `--exclude-standard` because their purpose is to verify unfiltered `--others` output. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-commit-script')
0 files changed, 0 insertions, 0 deletions