From 563478c3f83be93ab369368c5a418d7f75941594 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 9 Feb 2009 10:24:51 +0100 Subject: [PATCH] t2200: Avoid glob pattern that also matches files On Windows, there is an unfortunate interaction between the MSYS bash and git's command line processing: - Since Windows's CMD does not do the wildcard expansion, but passes arguments like path? through to the programs, the programs must do the expansion themselves. This happens in the startup code before main() is entered. - bash, however, passes the argument "path?" to git, assuming that git will see the unquoted word unchanged as a single argument. But actually git expands the unquoted word before main() is entered. Since at the time when the git ls-files is invoked not all names that the test case is interested in exist as files, only a subset was listed, so that the test failed. We now list all interesting paths explicitly. Signed-off-by: Johannes Sixt --- t/t2200-add-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index b2ddf5ace3..652801ebca 100755 --- a/t/t2200-add-update.sh +++ b/t/t2200-add-update.sh @@ -150,7 +150,7 @@ test_expect_success 'add -u resolves unmerged paths' ' echo 2 >path3 && echo 2 >path5 && git add -u && - git ls-files -s "path?" >actual && + git ls-files -s path1 path3 path4 path5 path6 >actual && { echo "100644 $three 0 path1" echo "100644 $one 1 path3" -- 2.11.4.GIT