Skip to content

Commit 7f1b225

Browse files
ramsay-jonesgitster
authored andcommitted
t7400: add !CYGWIN prerequisite to 'add with \\ in path'
Commit cf9e55f ("submodule: prevent backslash expantion in submodule names", 07-04-2017) added a test which creates a git repository with some backslash characters in the name. On windows, where the backslash character is a directory separator, it is not possible to create a repository with the name 'sub\with\backslash'. (The NTFS filesystem would probably allow it, but the win32 api does not). The MinGW and Git for Windows versions of git actually create a repository called 'backslash' in the sub-directory 'sub/with'. On cygwin, however, due to the slightly schizophrenic treatment of the backslash character by cygwin-git, this test fails at the 'git init' stage. The git-init command does not recognise the directory separators in the input path (eg. is_dir_sep('\\') is false), so it does not attempt to create the leading directories 'sub/with'. (The call to mkdir('sub\\with\\backslash') actually does recognise the directory separators, but fails because the 'sub/with' directory doesn't exist). In order to suppress the test failure (for now), add the !CYGWIN test prerequisite. Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cf9e55f commit 7f1b225

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t7400-submodule-basic.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ test_expect_success 'submodule add with ./, /.. and // in path' '
273273
test_cmp empty untracked
274274
'
275275

276-
test_expect_success 'submodule add with \\ in path' '
276+
test_expect_success !CYGWIN 'submodule add with \\ in path' '
277277
test_when_finished "rm -rf parent sub\\with\\backslash" &&
278278
279279
# Initialize a repo with a backslash in its name

0 commit comments

Comments
 (0)