Merge branch 'jk/pathspec-literal'
authorJunio C Hamano <gitster@pobox.com>
Tue, 8 Jan 2013 21:22:32 +0000 (13:22 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Jan 2013 21:22:32 +0000 (13:22 -0800)
Finishing touches to fix a test breakage on Windows

* jk/pathspec-literal:
t6130-pathspec-noglob: Windows does not allow a file named "f*"

t/t6130-pathspec-noglob.sh
index bb5e7100549c77745a91105a9ce2a1a0e3f0a7e3..39ef61994f6a4b4bea1731002f7637232e7dd349 100755 (executable)
@@ -6,7 +6,13 @@ test_description='test globbing (and noglob) of pathspec limiting'
 test_expect_success 'create commits with glob characters' '
        test_commit unrelated bar &&
        test_commit vanilla foo &&
-       test_commit star "f*" &&
+       # insert file "f*" in the commit, but in a way that avoids
+       # the name "f*" in the worktree, because it is not allowed
+       # on Windows (the tests below do not depend on the presence
+       # of the file in the worktree)
+       git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
+       test_tick &&
+       git commit -m star &&
        test_commit bracket "f[o][o]"
 '