Skip to content

Commit 6dd9a9b

Browse files
committed
t6022: skip the unrepresentable file name under BusyBox
The setup shared by the --missing=print-info tests creates a file literally named `bat"`. On native Windows the double-quote is a reserved file name character; the MSYS2 Bash gets away with it because Cygwin transparently mangles such names, but BusyBox' `ash` talks to the Win32 API directly and fails with "can't create bat\": Invalid argument", taking the whole setup -- and thus all five print-info tests -- down with it. None of the objects exercised in this loop (HEAD~1, HEAD:foo, HEAD:baz baz, ...) is that file, and the expected object lists are computed dynamically, so simply not creating it under BusyBox leaves the tests intact. Assisted-by: Opus 4.8 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent f866a5f commit 6dd9a9b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

t/t6022-rev-list-missing.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,13 @@ do
158158
mkdir foo &&
159159
echo bar >foo/bar &&
160160
echo baz >"baz baz" &&
161-
echo bat >bat\" &&
161+
# Unlike MSYS2, BusyBox' native Win32 cannot create a file
162+
# whose name contains the reserved '"' character; no test in
163+
# this loop references it, so skip creating it under BusyBox.
164+
if ! test_have_prereq BUSYBOX
165+
then
166+
echo bat >bat\"
167+
fi &&
162168
git add -A &&
163169
git commit -m second &&
164170

0 commit comments

Comments
 (0)