Summary
Two test files are committed as 100644 while every other t/*.sh is 100755:
$ git ls-files -s t/*.sh | awk '$1!="100755"{print $1, $4}'
100644 t/t0025-worktree-common-dir.sh
100644 t/t9018-workspace-flow-affected.sh
t/run-tests.sh chmods a test before running it:
if ! test -x "$test"; then
chmod +x "$test"
fi
so this does not break anything — but it means every run of the suite leaves a mode change in the working tree:
$ bash t/run-tests.sh t901
$ git status --short
M t/t9018-workspace-flow-affected.sh
That is a small papercut with a real edge: it is easy to sweep the stray mode change into an unrelated commit with git add -A. I did exactly that while preparing #201 and had to strip it back out.
Suggested fix
chmod +x t/t0025-worktree-common-dir.sh t/t9018-workspace-flow-affected.sh
and commit the mode change, so the repository matches what the runner expects.
Worth considering alongside it: run-tests.sh could skip a non-executable test with a clear message instead of silently chmodding, so a file committed with the wrong mode is visible rather than papered over.
Summary
Two test files are committed as
100644while every othert/*.shis100755:t/run-tests.shchmods a test before running it:so this does not break anything — but it means every run of the suite leaves a mode change in the working tree:
That is a small papercut with a real edge: it is easy to sweep the stray mode change into an unrelated commit with
git add -A. I did exactly that while preparing #201 and had to strip it back out.Suggested fix
and commit the mode change, so the repository matches what the runner expects.
Worth considering alongside it:
run-tests.shcould skip a non-executable test with a clear message instead of silently chmodding, so a file committed with the wrong mode is visible rather than papered over.