{"thread":{"id":"45837","subject":"[PATCH v2] t7400: add !CYGWIN prerequisite to 'add with \\\\ in path'","startedAt":"2017-04-30T17:29:39Z","lastAt":"2017-05-01T02:04:07Z","messageCount":2,"participants":["Ramsay Jones","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"318263","messageId":"bd5e3dc3-14f2-da03-4487-a52d3c0b52fe@ramsayjones.plus.com","threadId":"45837","inReplyTo":null,"subject":"[PATCH v2] t7400: add !CYGWIN prerequisite to 'add with \\\\ in path'","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2017-04-30T17:29:30Z","receivedAt":"2017-04-30T17:29:39Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit cf9e55f494 (\"submodule: prevent backslash expantion in submodule\nnames\", 07-04-2017) added a test which creates a git repository with\nsome backslash characters in the name. On windows, where the backslash\ncharacter is a directory separator, it is not possible to create a\nrepository with the name 'sub\\with\\backslash'. (The NTFS filesystem would\nprobably allow it, but the win32 api does not). The MinGW and Git for\nWindows versions of git actually create a repository called 'backslash'\nin the sub-directory 'sub/with'.\n\nOn cygwin, however, due to the slightly schizophrenic treatment of the\nbackslash character by cygwin-git, this test fails at the 'git init'\nstage. The git-init command does not recognise the directory separators\nin the input path (eg. is_dir_sep('\\\\') is false), so it does not\nattempt to create the leading directories 'sub/with'. (The call to\nmkdir('sub\\\\with\\\\backslash') actually does recognise the directory\nseparators, but fails because the 'sub/with' directory doesn't exist).\n\nIn order to suppress the test failure (for now), add the !CYGWIN test\nprerequisite.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Junio,\n\nThis is the 'v2' re-roll of the 'BSLASHPSEC' patch. :-D\n\nATB,\nRamsay Jones\n\n t/t7400-submodule-basic.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex c2706fe47..d0357f1d8 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -273,7 +273,7 @@ test_expect_success 'submodule add with ./, /.. and // in path' '\n \ttest_cmp empty untracked\n '\n \n-test_expect_success 'submodule add with \\\\ in path' '\n+test_expect_success !CYGWIN 'submodule add with \\\\ in path' '\n \ttest_when_finished \"rm -rf parent sub\\\\with\\\\backslash\" &&\n \n \t# Initialize a repo with a backslash in its name\n-- \n2.12.0\n"},{"id":"318286","messageId":"xmqqk261ib8y.fsf@gitster.mtv.corp.google.com","threadId":"45837","inReplyTo":"bd5e3dc3-14f2-da03-4487-a52d3c0b52fe@ramsayjones.plus.com","subject":"Re: [PATCH v2] t7400: add !CYGWIN prerequisite to 'add with \\\\ in path'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-05-01T02:03:57Z","receivedAt":"2017-05-01T02:04:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n\n> Commit cf9e55f494 (\"submodule: prevent backslash expantion in submodule\n> names\", 07-04-2017) added a test which creates a git repository with\n> some backslash characters in the name. On windows, where the backslash\n> character is a directory separator, it is not possible to create a\n> repository with the name 'sub\\with\\backslash'. (The NTFS filesystem would\n> probably allow it, but the win32 api does not). The MinGW and Git for\n> Windows versions of git actually create a repository called 'backslash'\n> in the sub-directory 'sub/with'.\n>\n> On cygwin, however, due to the slightly schizophrenic treatment of the\n> backslash character by cygwin-git, this test fails at the 'git init'\n> stage. The git-init command does not recognise the directory separators\n> in the input path (eg. is_dir_sep('\\\\') is false), so it does not\n> attempt to create the leading directories 'sub/with'. (The call to\n> mkdir('sub\\\\with\\\\backslash') actually does recognise the directory\n> separators, but fails because the 'sub/with' directory doesn't exist).\n>\n> In order to suppress the test failure (for now), add the !CYGWIN test\n> prerequisite.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> ---\n>\n> Hi Junio,\n>\n> This is the 'v2' re-roll of the 'BSLASHPSEC' patch. :-D\n>\n\nThanks.\n\n\n> ATB,\n> Ramsay Jones\n>\n>  t/t7400-submodule-basic.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\n> index c2706fe47..d0357f1d8 100755\n> --- a/t/t7400-submodule-basic.sh\n> +++ b/t/t7400-submodule-basic.sh\n> @@ -273,7 +273,7 @@ test_expect_success 'submodule add with ./, /.. and // in path' '\n>  \ttest_cmp empty untracked\n>  '\n>  \n> -test_expect_success 'submodule add with \\\\ in path' '\n> +test_expect_success !CYGWIN 'submodule add with \\\\ in path' '\n>  \ttest_when_finished \"rm -rf parent sub\\\\with\\\\backslash\" &&\n>  \n>  \t# Initialize a repo with a backslash in its name\n"}]}