提交 6fd1106a 编写于 作者: J Johannes Sixt

t3700: Skip a test with backslashes in pathspec

The test verifies that glob special characters can be escaped with
backslashes.  In particular, the string fo\[ou\]bar is given to git.

On Windows, this does not work because backslashes are first of all
directory separators, and first thing git does with a pathspec from the
command line is to convert backslashes to forward slashes.
Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
上级 ee9fb68c
......@@ -222,7 +222,7 @@ test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' '
! ( git ls-files foo1 | grep foo1 )
'
test_expect_success 'git add '\''fo\[ou\]bar'\'' ignores foobar' '
test_expect_success BSLASHPSPEC "git add 'fo\\[ou\\]bar' ignores foobar" '
git reset --hard &&
touch fo\[ou\]bar foobar &&
git add '\''fo\[ou\]bar'\'' &&
......
......@@ -688,9 +688,11 @@ case $(uname -s) in
builtin pwd -W
}
# no POSIX permissions
# backslashes in pathspec are converted to '/'
;;
*)
test_set_prereq POSIXPERM
test_set_prereq BSLASHPSPEC
;;
esac
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册