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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 t/t6130-pathspec-noglob.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/t/t6130-pathspec-noglob.sh b/t/t6130-pathspec-noglob.sh
index bb5e710..39ef619 100755
--- a/t/t6130-pathspec-noglob.sh
+++ b/t/t6130-pathspec-noglob.sh
@@ -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]"
 '
 
-- 
1.8.1.1672.g5e2a3d4.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]