Skip to content

Commit

Permalink
t3700: Skip a test with backslashes in pathspec
Browse files Browse the repository at this point in the history
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: Johannes Sixt <j6t@kdbg.org>
  • Loading branch information
Johannes Sixt committed Mar 22, 2009
1 parent ee9fb68 commit 6fd1106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion t/t3700-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'\'' &&
Expand Down
2 changes: 2 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6fd1106

Please sign in to comment.