Skip to content

Commit 6af95e8

Browse files
j6tgitster
authored andcommitted
t6130-pathspec-noglob: Windows does not allow a file named "f*"
Windows disallows file names that contain a star. Arrange the test setup to insert the file name "f*" in the repository without the corresponding file in the worktree. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 823ab40 commit 6af95e8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

t/t6130-pathspec-noglob.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ test_description='test globbing (and noglob) of pathspec limiting'
66
test_expect_success 'create commits with glob characters' '
77
test_commit unrelated bar &&
88
test_commit vanilla foo &&
9-
test_commit star "f*" &&
9+
# insert file "f*" in the commit, but in a way that avoids
10+
# the name "f*" in the worktree, because it is not allowed
11+
# on Windows (the tests below do not depend on the presence
12+
# of the file in the worktree)
13+
git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
14+
test_tick &&
15+
git commit -m star &&
1016
test_commit bracket "f[o][o]"
1117
'
1218

0 commit comments

Comments
 (0)