{"thread":{"id":"28683","subject":"[PATCH 3/8] t9001: do not fail only due to CR/LF issues","startedAt":"2011-10-14T22:53:27Z","lastAt":"2011-10-16T10:21:54Z","messageCount":21,"participants":["Pat Thoyts","Junio C Hamano","Sebastian Schuberth"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"177697","messageId":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":null,"subject":"[PATCH 0/8] Some patches from msysGit","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:27Z","receivedAt":"2011-10-14T22:53:27Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"This series collects some recent patches required for msysGit\napplied onto 'next' for upstream application.\n\nJohannes Schindelin (4):\n  t1020: disable the pwd test on MinGW\n  t1402: Ignore a few cases that must fail due to DOS path expansion\n  t9001: do not fail only due to CR/LF issues\n  t9300: do not run --cat-blob-fd related tests on MinGW\n\nPat Thoyts (3):\n  t9901: fix line-ending dependency on windows\n  mergetools: use the correct tool for Beyond Compare 3 on Windows\n  mingw: ensure sockets are initialized before calling gethostname\n\nSebastian Schuberth (1):\n  git-svn: On MSYS, escape and quote SVN_SSH also if set by the user\n\n compat/mingw.c              |    7 +++++++\n compat/mingw.h              |    3 +++\n git-svn.perl                |   15 +++++++--------\n mergetools/bc3              |    9 ++++++++-\n t/t1020-subdirectory.sh     |    2 +-\n t/t1402-check-ref-format.sh |   15 +++++++++------\n t/t9001-send-email.sh       |    1 +\n t/t9300-fast-import.sh      |    8 ++++----\n t/t9901-git-web--browse.sh  |   10 +++++-----\n 9 files changed, 45 insertions(+), 25 deletions(-)\n\n-- \n1.7.7.1.gbba15\n"},{"id":"177690","messageId":"1318632815-29945-2-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 1/8] t1020: disable the pwd test on MinGW","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:28Z","receivedAt":"2011-10-14T22:53:28Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIt fails both for line ending and for DOS path reasons.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1020-subdirectory.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh\nindex 3b1b985..e23ac0e 100755\n--- a/t/t1020-subdirectory.sh\n+++ b/t/t1020-subdirectory.sh\n@@ -118,7 +118,7 @@ test_expect_success 'alias expansion' '\n \t)\n '\n \n-test_expect_success '!alias expansion' '\n+test_expect_success NOT_MINGW '!alias expansion' '\n \tpwd >expect &&\n \t(\n \t\tgit config alias.test !pwd &&\n-- \n1.7.7.1.gbba15\n"},{"id":"177693","messageId":"1318632815-29945-3-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:29Z","receivedAt":"2011-10-14T22:53:29Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t1402-check-ref-format.sh |   15 +++++++++------\n 1 files changed, 9 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh\nindex 710fcca..1a5e343 100755\n--- a/t/t1402-check-ref-format.sh\n+++ b/t/t1402-check-ref-format.sh\n@@ -36,7 +36,7 @@ invalid_ref 'refs///heads/foo'\n valid_ref 'refs///heads/foo' --normalize\n invalid_ref 'heads/foo/'\n invalid_ref '/heads/foo'\n-valid_ref '/heads/foo' --normalize\n+test_have_prereq MINGW || valid_ref '/heads/foo' --normalize\n invalid_ref '///heads/foo'\n valid_ref '///heads/foo' --normalize\n invalid_ref './foo'\n@@ -120,9 +120,12 @@ invalid_ref \"$ref\" --allow-onelevel\n invalid_ref \"$ref\" --refspec-pattern\n invalid_ref \"$ref\" '--refspec-pattern --allow-onelevel'\n invalid_ref \"$ref\" --normalize\n-valid_ref \"$ref\" '--allow-onelevel --normalize'\n-invalid_ref \"$ref\" '--refspec-pattern --normalize'\n-valid_ref \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n+if test_have_prereq NOT_MINGW\n+then\n+\tvalid_ref \"$ref\" '--allow-onelevel --normalize'\n+\tinvalid_ref \"$ref\" '--refspec-pattern --normalize'\n+\tvalid_ref \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n+fi\n \n test_expect_success \"check-ref-format --branch @{-1}\" '\n \tT=$(git write-tree) &&\n@@ -166,10 +169,10 @@ invalid_ref_normalized() {\n \n valid_ref_normalized 'heads/foo' 'heads/foo'\n valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo'\n-valid_ref_normalized '/heads/foo' 'heads/foo'\n+test_have_prereq MINGW || valid_ref_normalized '/heads/foo' 'heads/foo'\n valid_ref_normalized '///heads/foo' 'heads/foo'\n invalid_ref_normalized 'foo'\n-invalid_ref_normalized '/foo'\n+test_have_prereq MINGW || invalid_ref_normalized '/foo'\n invalid_ref_normalized 'heads/foo/../bar'\n invalid_ref_normalized 'heads/./foo'\n invalid_ref_normalized 'heads\\foo'\n-- \n1.7.7.1.gbba15\n"},{"id":"177689","messageId":"1318632815-29945-4-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 3/8] t9001: do not fail only due to CR/LF issues","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:30Z","receivedAt":"2011-10-14T22:53:30Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9001-send-email.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 579ddb7..7d75738 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -23,6 +23,7 @@ test_expect_success $PREREQ \\\n       echo do\n       echo \"  echo \\\"!\\$a!\\\"\"\n       echo \"done >commandline\\$output\"\n+      test_have_prereq MINGW && echo \"dos2unix commandline\\$output\"\n       echo \"cat > msgtxt\\$output\"\n       ) >fake.sendmail &&\n      chmod +x ./fake.sendmail &&\n-- \n1.7.7.1.gbba15\n"},{"id":"177694","messageId":"1318632815-29945-5-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 4/8] git-svn: On MSYS, escape and quote SVN_SSH also if set by the user","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:31Z","receivedAt":"2011-10-14T22:53:31Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Sebastian Schuberth <sschuberth@gmail.com>\n\nWhile GIT_SSH does not require any escaping / quoting (e.g. for paths\ncontaining spaces), SVN_SSH requires it due to its use in a Perl script.\n\nPreviously, SVN_SSH has only been escaped and quoted automatically if it\nwas unset and thus derived from GIT_SSH. For user convenience, do the\nescaping and quoting also for a SVN_SSH set by the user. This way, the\nuser is able to use the same unescaped and unquoted syntax for GIT_SSH\nand SVN_SSH.\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n git-svn.perl |   15 +++++++--------\n 1 files changed, 7 insertions(+), 8 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex a0410f0..3b33379 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -22,14 +22,13 @@ $Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';\n $Git::SVN::Ra::_log_window_size = 100;\n $Git::SVN::_minimize_url = 'unset';\n \n-if (! exists $ENV{SVN_SSH}) {\n-\tif (exists $ENV{GIT_SSH}) {\n-\t\t$ENV{SVN_SSH} = $ENV{GIT_SSH};\n-\t\tif ($^O eq 'msys') {\n-\t\t\t$ENV{SVN_SSH} =~ s/\\\\/\\\\\\\\/g;\n-\t\t\t$ENV{SVN_SSH} =~ s/(.*)/\"$1\"/;\n-\t\t}\n-\t}\n+if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) {\n+\t$ENV{SVN_SSH} = $ENV{GIT_SSH};\n+}\n+\n+if (exists $ENV{SVN_SSH} && $^O eq 'msys') {\n+\t$ENV{SVN_SSH} =~ s/\\\\/\\\\\\\\/g;\n+\t$ENV{SVN_SSH} =~ s/(.*)/\"$1\"/;\n }\n \n $Git::SVN::Log::TZ = $ENV{TZ};\n-- \n1.7.7.1.gbba15\n"},{"id":"177696","messageId":"1318632815-29945-6-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 5/8] t9901: fix line-ending dependency on windows","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:32Z","receivedAt":"2011-10-14T22:53:32Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n t/t9901-git-web--browse.sh |   10 +++++-----\n 1 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh\nindex 7906e5d..1185b42 100755\n--- a/t/t9901-git-web--browse.sh\n+++ b/t/t9901-git-web--browse.sh\n@@ -12,7 +12,7 @@ test_expect_success \\\n \techo http://example.com/foo\\&bar >expect &&\n \tgit config browser.custom.cmd echo &&\n \tgit web--browse --browser=custom \\\n-\t\thttp://example.com/foo\\&bar >actual &&\n+\t\thttp://example.com/foo\\&bar | tr -d \"\\r\" >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -21,7 +21,7 @@ test_expect_success \\\n \techo http://example.com/foo\\;bar >expect &&\n \tgit config browser.custom.cmd echo &&\n \tgit web--browse --browser=custom \\\n-\t\thttp://example.com/foo\\;bar >actual &&\n+\t\thttp://example.com/foo\\;bar | tr -d \"\\r\" >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -30,7 +30,7 @@ test_expect_success \\\n \techo http://example.com/foo#bar >expect &&\n \tgit config browser.custom.cmd echo &&\n \tgit web--browse --browser=custom \\\n-\t\thttp://example.com/foo#bar >actual &&\n+\t\thttp://example.com/foo#bar | tr -d \"\\r\" >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -44,7 +44,7 @@ test_expect_success \\\n \tchmod +x \"fake browser\" &&\n \tgit config browser.w3m.path \"`pwd`/fake browser\" &&\n \tgit web--browse --browser=w3m \\\n-\t\thttp://example.com/foo >actual &&\n+\t\thttp://example.com/foo | tr -d \"\\r\" >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -59,7 +59,7 @@ test_expect_success \\\n \t\t}\n \t\tf\" &&\n \tgit web--browse --browser=custom \\\n-\t\thttp://example.com/foo >actual &&\n+\t\thttp://example.com/foo | tr -d \"\\r\" >actual &&\n \ttest_cmp expect actual\n '\n \n-- \n1.7.7.1.gbba15\n"},{"id":"177691","messageId":"1318632815-29945-7-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 6/8] t9300: do not run --cat-blob-fd related tests on MinGW","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:33Z","receivedAt":"2011-10-14T22:53:33Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nAs diagnosed by Johannes Sixt, msys.dll does not hand through file\ndescriptors > 2 to child processes, so these test cases cannot passes when\nrun through an MSys bash.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n t/t9300-fast-import.sh |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex bd32b91..438aaf6 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -2237,7 +2237,7 @@ test_expect_success 'R: cat-blob-fd must be a nonnegative integer' '\n \ttest_must_fail git fast-import --cat-blob-fd=-1 </dev/null\n '\n \n-test_expect_success 'R: print old blob' '\n+test_expect_success NOT_MINGW 'R: print old blob' '\n \tblob=$(echo \"yes it can\" | git hash-object -w --stdin) &&\n \tcat >expect <<-EOF &&\n \t${blob} blob 11\n@@ -2249,7 +2249,7 @@ test_expect_success 'R: print old blob' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'R: in-stream cat-blob-fd not respected' '\n+test_expect_success NOT_MINGW 'R: in-stream cat-blob-fd not respected' '\n \techo hello >greeting &&\n \tblob=$(git hash-object -w greeting) &&\n \tcat >expect <<-EOF &&\n@@ -2270,7 +2270,7 @@ test_expect_success 'R: in-stream cat-blob-fd not respected' '\n \ttest_cmp expect actual.1\n '\n \n-test_expect_success 'R: print new blob' '\n+test_expect_success NOT_MINGW 'R: print new blob' '\n \tblob=$(echo \"yep yep yep\" | git hash-object --stdin) &&\n \tcat >expect <<-EOF &&\n \t${blob} blob 12\n@@ -2288,7 +2288,7 @@ test_expect_success 'R: print new blob' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'R: print new blob by sha1' '\n+test_expect_success NOT_MINGW 'R: print new blob by sha1' '\n \tblob=$(echo \"a new blob named by sha1\" | git hash-object --stdin) &&\n \tcat >expect <<-EOF &&\n \t${blob} blob 25\n-- \n1.7.7.1.gbba15\n"},{"id":"177692","messageId":"1318632815-29945-8-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:34Z","receivedAt":"2011-10-14T22:53:34Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"On Windows the bcompare tool launches a graphical program and does\nnot wait for it to terminate. A separate 'bcomp' tool is provided which\nwill wait for the view to exit so we use this instead.\n\nReported-by: Werner BEROUX <werner@beroux.com>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n mergetools/bc3 |    9 ++++++++-\n 1 files changed, 8 insertions(+), 1 deletions(-)\n\ndiff --git a/mergetools/bc3 b/mergetools/bc3\nindex 27b3dd4..b642bf2 100644\n--- a/mergetools/bc3\n+++ b/mergetools/bc3\n@@ -16,5 +16,12 @@ merge_cmd () {\n }\n \n translate_merge_tool_path() {\n-\techo bcompare\n+\tcase $(uname -s) in\n+\t*MINGW*)\n+\t\techo bcomp\n+\t\t;;\n+\t*)\n+\t\techo bcompare\n+\t\t;;\n+\tesac\n }\n-- \n1.7.7.1.gbba15\n"},{"id":"177695","messageId":"1318632815-29945-9-git-send-email-patthoyts@users.sourceforge.net","threadId":"28683","inReplyTo":"1318632815-29945-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 8/8] mingw: ensure sockets are initialized before calling gethostname","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-14T22:53:35Z","receivedAt":"2011-10-14T22:53:35Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"If the Windows sockets subsystem has not been initialized yet then an\nattempt to get the hostname returns an error and prints a warning to the\nconsole. This solves this issue for msysGit as seen with 'git fetch'.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n compat/mingw.c |    7 +++++++\n compat/mingw.h |    3 +++\n 2 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 8947418..efdc703 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1321,6 +1321,13 @@ static void ensure_socket_initialization(void)\n \tinitialized = 1;\n }\n \n+#undef gethostname\n+int mingw_gethostname(char *name, int namelen)\n+{\n+    ensure_socket_initialization();\n+    return gethostname(name, namelen);\n+}\n+\n #undef gethostbyname\n struct hostent *mingw_gethostbyname(const char *host)\n {\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex ce9dd98..fecf0d0 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -190,6 +190,9 @@ char *mingw_getcwd(char *pointer, int len);\n char *mingw_getenv(const char *name);\n #define getenv mingw_getenv\n \n+int mingw_gethostname(char *host, int namelen);\n+#define gethostname mingw_gethostname\n+\n struct hostent *mingw_gethostbyname(const char *host);\n #define gethostbyname mingw_gethostbyname\n \n-- \n1.7.7.1.gbba15\n"},{"id":"177710","messageId":"7vwrc6x1cp.fsf@alter.siamese.dyndns.org","threadId":"28683","inReplyTo":"1318632815-29945-3-git-send-email-patthoyts@users.sourceforge.net","subject":"Re: [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-15T05:36:38Z","receivedAt":"2011-10-15T05:36:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n>  t/t1402-check-ref-format.sh |   15 +++++++++------\n\nDidn't we see a different patch that attempts to address the same issue\nrecently on the list from J6t, or is this a fix for a different problem?\n\n>  1 files changed, 9 insertions(+), 6 deletions(-)\n>\n> diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh\n> index 710fcca..1a5e343 100755\n> --- a/t/t1402-check-ref-format.sh\n> +++ b/t/t1402-check-ref-format.sh\n> @@ -36,7 +36,7 @@ invalid_ref 'refs///heads/foo'\n>  valid_ref 'refs///heads/foo' --normalize\n>  invalid_ref 'heads/foo/'\n>  invalid_ref '/heads/foo'\n> -valid_ref '/heads/foo' --normalize\n> +test_have_prereq MINGW || valid_ref '/heads/foo' --normalize\n>  invalid_ref '///heads/foo'\n>  valid_ref '///heads/foo' --normalize\n>  invalid_ref './foo'\n> @@ -120,9 +120,12 @@ invalid_ref \"$ref\" --allow-onelevel\n>  invalid_ref \"$ref\" --refspec-pattern\n>  invalid_ref \"$ref\" '--refspec-pattern --allow-onelevel'\n>  invalid_ref \"$ref\" --normalize\n> -valid_ref \"$ref\" '--allow-onelevel --normalize'\n> -invalid_ref \"$ref\" '--refspec-pattern --normalize'\n> -valid_ref \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n> +if test_have_prereq NOT_MINGW\n> +then\n> +\tvalid_ref \"$ref\" '--allow-onelevel --normalize'\n> +\tinvalid_ref \"$ref\" '--refspec-pattern --normalize'\n> +\tvalid_ref \"$ref\" '--refspec-pattern --allow-onelevel --normalize'\n> +fi\n>  \n>  test_expect_success \"check-ref-format --branch @{-1}\" '\n>  \tT=$(git write-tree) &&\n> @@ -166,10 +169,10 @@ invalid_ref_normalized() {\n>  \n>  valid_ref_normalized 'heads/foo' 'heads/foo'\n>  valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo'\n> -valid_ref_normalized '/heads/foo' 'heads/foo'\n> +test_have_prereq MINGW || valid_ref_normalized '/heads/foo' 'heads/foo'\n>  valid_ref_normalized '///heads/foo' 'heads/foo'\n>  invalid_ref_normalized 'foo'\n> -invalid_ref_normalized '/foo'\n> +test_have_prereq MINGW || invalid_ref_normalized '/foo'\n>  invalid_ref_normalized 'heads/foo/../bar'\n>  invalid_ref_normalized 'heads/./foo'\n>  invalid_ref_normalized 'heads\\foo'\n"},{"id":"177711","messageId":"7vsjmux0z3.fsf@alter.siamese.dyndns.org","threadId":"28683","inReplyTo":"1318632815-29945-6-git-send-email-patthoyts@users.sourceforge.net","subject":"Re: [PATCH 5/8] t9901: fix line-ending dependency on windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-15T05:44:48Z","receivedAt":"2011-10-15T05:44:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> ---\n>  t/t9901-git-web--browse.sh |   10 +++++-----\n>  1 files changed, 5 insertions(+), 5 deletions(-)\n>\n> diff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh\n> index 7906e5d..1185b42 100755\n> --- a/t/t9901-git-web--browse.sh\n> +++ b/t/t9901-git-web--browse.sh\n> @@ -12,7 +12,7 @@ test_expect_success \\\n>  \techo http://example.com/foo\\&bar >expect &&\n>  \tgit config browser.custom.cmd echo &&\n>  \tgit web--browse --browser=custom \\\n> -\t\thttp://example.com/foo\\&bar >actual &&\n> +\t\thttp://example.com/foo\\&bar | tr -d \"\\r\" >actual &&\n>  \ttest_cmp expect actual\n>  '\n\nThis is unnice for two reasons. We have web--browse five times in this\ntest script, and you add tr exactly the same way to each and every one of\nthem. And you are losing the error condition from each and every one of\nthese web--browse invocations.\n\nHaving to do the same change to all invocations of the same command\nsuggests that perhaps you can and should wrap that pattern into a single\nhelper, perhaps like:\n\ntest_web_browse () {\n\t# browser=$1 url=$2\n\tgit web--browse --browser=\"$1\" \"$2\" >actual &&\n        tr -d '\\015' <actual >text &&\n        test_cmp expect text\n}\n\nor something?\n"},{"id":"177713","messageId":"7vobxix0pk.fsf@alter.siamese.dyndns.org","threadId":"28683","inReplyTo":"1318632815-29945-8-git-send-email-patthoyts@users.sourceforge.net","subject":"Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-15T05:50:31Z","receivedAt":"2011-10-15T05:50:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n> On Windows the bcompare tool launches a graphical program and does\n> not wait for it to terminate. A separate 'bcomp' tool is provided which\n> will wait for the view to exit so we use this instead.\n\nHmm, does this only apply to Windows, or are there other platforms on\nwhich BC3 supplies bcomp for the exact same reason? What I am trying to\nget at is that it might be nicer if we do not have to check uname, e.g.\n\n\tif type bcomp >/dev/null 2>/dev/null\n        then\n        \techo bcomp\n\telse\n        \techo bcompare\n\tfi\n\n> Reported-by: Werner BEROUX <werner@beroux.com>\n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> ---\n>  mergetools/bc3 |    9 ++++++++-\n>  1 files changed, 8 insertions(+), 1 deletions(-)\n>\n> diff --git a/mergetools/bc3 b/mergetools/bc3\n> index 27b3dd4..b642bf2 100644\n> --- a/mergetools/bc3\n> +++ b/mergetools/bc3\n> @@ -16,5 +16,12 @@ merge_cmd () {\n>  }\n>  \n>  translate_merge_tool_path() {\n> -\techo bcompare\n> +\tcase $(uname -s) in\n> +\t*MINGW*)\n> +\t\techo bcomp\n> +\t\t;;\n> +\t*)\n> +\t\techo bcompare\n> +\t\t;;\n> +\tesac\n>  }\n"},{"id":"177719","messageId":"4E996012.8090002@gmail.com","threadId":"28683","inReplyTo":"7vobxix0pk.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2011-10-15T10:27:30Z","receivedAt":"2011-10-15T10:27:30Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On 15.10.2011 07:50, Junio C Hamano wrote:\n\n> Hmm, does this only apply to Windows, or are there other platforms on\n> which BC3 supplies bcomp for the exact same reason? What I am trying to\n\nBC3 is only available for Linux and Windows, so it only applies to \nWindows currently.\n\n-- \nSebastian Schuberth\n"},{"id":"177720","messageId":"87pqhyigqy.fsf@fox.patthoyts.tk","threadId":"28683","inReplyTo":"7vsjmux0z3.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 5/8] t9901: fix line-ending dependency on windows","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-15T12:25:25Z","receivedAt":"2011-10-15T12:25:25Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n>\n>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n>> ---\n>>  t/t9901-git-web--browse.sh |   10 +++++-----\n>>  1 files changed, 5 insertions(+), 5 deletions(-)\n>>\n>> diff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh\n>> index 7906e5d..1185b42 100755\n>> --- a/t/t9901-git-web--browse.sh\n>> +++ b/t/t9901-git-web--browse.sh\n>> @@ -12,7 +12,7 @@ test_expect_success \\\n>>  \techo http://example.com/foo\\&bar >expect &&\n>>  \tgit config browser.custom.cmd echo &&\n>>  \tgit web--browse --browser=custom \\\n>> -\t\thttp://example.com/foo\\&bar >actual &&\n>> +\t\thttp://example.com/foo\\&bar | tr -d \"\\r\" >actual &&\n>>  \ttest_cmp expect actual\n>>  '\n>\n>This is unnice for two reasons. We have web--browse five times in this\n>test script, and you add tr exactly the same way to each and every one of\n>them. And you are losing the error condition from each and every one of\n>these web--browse invocations.\n>\n>Having to do the same change to all invocations of the same command\n>suggests that perhaps you can and should wrap that pattern into a single\n>helper, perhaps like:\n>\n>test_web_browse () {\n>\t# browser=$1 url=$2\n>\tgit web--browse --browser=\"$1\" \"$2\" >actual &&\n>        tr -d '\\015' <actual >text &&\n>        test_cmp expect text\n>}\n>\n>or something?\n\nOK - The suggested code works fine so I shall re-roll this one shortly.\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"},{"id":"177721","messageId":"87fwiuig41.fsf@fox.patthoyts.tk","threadId":"28683","inReplyTo":"4E996012.8090002@gmail.com","subject":"Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-15T12:39:10Z","receivedAt":"2011-10-15T12:39:10Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n>On 15.10.2011 07:50, Junio C Hamano wrote:\n>\n>> Hmm, does this only apply to Windows, or are there other platforms on\n>> which BC3 supplies bcomp for the exact same reason? What I am trying to\n>\n>BC3 is only available for Linux and Windows, so it only applies to\n>Windows currently.\n\nAnd checking the linux distribution shows only a bcompare executable so\ntesting for the presence of 'bcomp' will be fine.\n\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"},{"id":"177723","messageId":"87k4862wmk.fsf@fox.patthoyts.tk","threadId":"28683","inReplyTo":"7vwrc6x1cp.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-15T13:49:07Z","receivedAt":"2011-10-15T13:49:07Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n>\n>>  t/t1402-check-ref-format.sh |   15 +++++++++------\n>\n>Didn't we see a different patch that attempts to address the same issue\n>recently on the list from J6t, or is this a fix for a different problem?\n>\n\nYou are correct - I'll leave this out of this series then. j6t's patch\nis an alternative fix for the same problem.\n\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"},{"id":"177745","messageId":"7vty79vrdn.fsf@alter.siamese.dyndns.org","threadId":"28683","inReplyTo":"4E996012.8090002@gmail.com","subject":"Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-15T20:14:16Z","receivedAt":"2011-10-15T20:14:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> On 15.10.2011 07:50, Junio C Hamano wrote:\n>\n>> Hmm, does this only apply to Windows, or are there other platforms on\n>> which BC3 supplies bcomp for the exact same reason? What I am trying to\n>\n> BC3 is only available for Linux and Windows, so it only applies to\n> Windows currently.\n\nWho asked anything about \"currently\"?\n"},{"id":"177747","messageId":"7vobxhvrdl.fsf@alter.siamese.dyndns.org","threadId":"28683","inReplyTo":"87k4862wmk.fsf@fox.patthoyts.tk","subject":"Re: [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-15T20:15:22Z","receivedAt":"2011-10-15T20:15:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>>Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n>>\n>>>  t/t1402-check-ref-format.sh |   15 +++++++++------\n>>\n>>Didn't we see a different patch that attempts to address the same issue\n>>recently on the list from J6t, or is this a fix for a different problem?\n>>\n>\n> You are correct - I'll leave this out of this series then. j6t's patch\n> is an alternative fix for the same problem.\n\nThanks for checking.\n"},{"id":"177769","messageId":"CAHGBnuPoV0-9ZY9MffB2KTxPyK0TQiPcyZg-bH9WYo7HCS+QKA@mail.gmail.com","threadId":"28683","inReplyTo":"7vty79vrdn.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2011-10-16T10:11:27Z","receivedAt":"2011-10-16T10:11:27Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Sat, Oct 15, 2011 at 22:14, Junio C Hamano <gitster@pobox.com> wrote:\n\n>>> Hmm, does this only apply to Windows, or are there other platforms on\n>>> which BC3 supplies bcomp for the exact same reason? What I am trying to\n>>\n>> BC3 is only available for Linux and Windows, so it only applies to\n>> Windows currently.\n>\n> Who asked anything about \"currently\"?\n\nHeh, no one. But obviously I cannot predict the future, that's why I\nexplicitly said \"currently\".\n\nHere's what I was meaning to say in more long-winded words: Although\nBC3 only supports Linux and Windows currently, IMHO it is unlikely\nthat future support for other platforms will suffer from the same\nissue as Windows and will require a different executable than\n\"bcompare\". And even if it was the case, that could be fixed then. For\nnow the proposed patch covers all cases and works well, and although\nyour suggestion would be more generic, it's not necessary, and the\ndiscussion about whether or not to use your more generic approach is\nstarting to outweigh the time that was required to write this patch as\nwell as the time that would be required for a future patch.\n\n-- \nSebastian Schuberth\n"},{"id":"177770","messageId":"CAHGBnuN3m6tyA5HMo+zmE8k_PPPesP3fOh6Y15uCixUgTN3+tg@mail.gmail.com","threadId":"28683","inReplyTo":"87fwiuig41.fsf@fox.patthoyts.tk","subject":"Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2011-10-16T10:12:56Z","receivedAt":"2011-10-16T10:12:56Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Sat, Oct 15, 2011 at 14:39, Pat Thoyts\n<patthoyts@users.sourceforge.net> wrote:\n\n> And checking the linux distribution shows only a bcompare executable so\n> testing for the presence of 'bcomp' will be fine.\n\nThat's what I was implying, sorry for not being more clear. I also\nchecked the Linux version of BC3 to verify that it only contains a\n\"bcompare\" executable.\n\n-- \nSebastian Schuberth\n"},{"id":"177771","messageId":"CAHGBnuP_piC5J9MxcME5SwbDtiuQHOmh7A3kfiAfVMpD8+zcPg@mail.gmail.com","threadId":"28683","inReplyTo":"87fwiuig41.fsf@fox.patthoyts.tk","subject":"Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2011-10-16T10:21:54Z","receivedAt":"2011-10-16T10:21:54Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Sat, Oct 15, 2011 at 14:39, Pat Thoyts\n<patthoyts@users.sourceforge.net> wrote:\n\n> And checking the linux distribution shows only a bcompare executable so\n> testing for the presence of 'bcomp' will be fine.\n\nI was meaning to say the same thing, sorry for not being more clear. I\nalso checked the Linux version of BC3 and verified that there's only a\n\"bcompare\" executable.\n\n-- \nSebastian Schuberth\n"}]}