git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/8] Some patches from msysGit
@ 2011-10-14 22:53 Pat Thoyts
  2011-10-14 22:53 ` [PATCH 1/8] t1020: disable the pwd test on MinGW Pat Thoyts
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Pat Thoyts

This series collects some recent patches required for msysGit
applied onto 'next' for upstream application.

Johannes Schindelin (4):
  t1020: disable the pwd test on MinGW
  t1402: Ignore a few cases that must fail due to DOS path expansion
  t9001: do not fail only due to CR/LF issues
  t9300: do not run --cat-blob-fd related tests on MinGW

Pat Thoyts (3):
  t9901: fix line-ending dependency on windows
  mergetools: use the correct tool for Beyond Compare 3 on Windows
  mingw: ensure sockets are initialized before calling gethostname

Sebastian Schuberth (1):
  git-svn: On MSYS, escape and quote SVN_SSH also if set by the user

 compat/mingw.c              |    7 +++++++
 compat/mingw.h              |    3 +++
 git-svn.perl                |   15 +++++++--------
 mergetools/bc3              |    9 ++++++++-
 t/t1020-subdirectory.sh     |    2 +-
 t/t1402-check-ref-format.sh |   15 +++++++++------
 t/t9001-send-email.sh       |    1 +
 t/t9300-fast-import.sh      |    8 ++++----
 t/t9901-git-web--browse.sh  |   10 +++++-----
 9 files changed, 45 insertions(+), 25 deletions(-)

-- 
1.7.7.1.gbba15

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/8] t1020: disable the pwd test on MinGW
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  2011-10-14 22:53 ` [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion Pat Thoyts
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

It fails both for line ending and for DOS path reasons.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t1020-subdirectory.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 3b1b985..e23ac0e 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -118,7 +118,7 @@ test_expect_success 'alias expansion' '
 	)
 '
 
-test_expect_success '!alias expansion' '
+test_expect_success NOT_MINGW '!alias expansion' '
 	pwd >expect &&
 	(
 		git config alias.test !pwd &&
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
  2011-10-14 22:53 ` [PATCH 1/8] t1020: disable the pwd test on MinGW Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  2011-10-15  5:36   ` Junio C Hamano
  2011-10-14 22:53 ` [PATCH 3/8] t9001: do not fail only due to CR/LF issues Pat Thoyts
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t1402-check-ref-format.sh |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
index 710fcca..1a5e343 100755
--- a/t/t1402-check-ref-format.sh
+++ b/t/t1402-check-ref-format.sh
@@ -36,7 +36,7 @@ invalid_ref 'refs///heads/foo'
 valid_ref 'refs///heads/foo' --normalize
 invalid_ref 'heads/foo/'
 invalid_ref '/heads/foo'
-valid_ref '/heads/foo' --normalize
+test_have_prereq MINGW || valid_ref '/heads/foo' --normalize
 invalid_ref '///heads/foo'
 valid_ref '///heads/foo' --normalize
 invalid_ref './foo'
@@ -120,9 +120,12 @@ invalid_ref "$ref" --allow-onelevel
 invalid_ref "$ref" --refspec-pattern
 invalid_ref "$ref" '--refspec-pattern --allow-onelevel'
 invalid_ref "$ref" --normalize
-valid_ref "$ref" '--allow-onelevel --normalize'
-invalid_ref "$ref" '--refspec-pattern --normalize'
-valid_ref "$ref" '--refspec-pattern --allow-onelevel --normalize'
+if test_have_prereq NOT_MINGW
+then
+	valid_ref "$ref" '--allow-onelevel --normalize'
+	invalid_ref "$ref" '--refspec-pattern --normalize'
+	valid_ref "$ref" '--refspec-pattern --allow-onelevel --normalize'
+fi
 
 test_expect_success "check-ref-format --branch @{-1}" '
 	T=$(git write-tree) &&
@@ -166,10 +169,10 @@ invalid_ref_normalized() {
 
 valid_ref_normalized 'heads/foo' 'heads/foo'
 valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo'
-valid_ref_normalized '/heads/foo' 'heads/foo'
+test_have_prereq MINGW || valid_ref_normalized '/heads/foo' 'heads/foo'
 valid_ref_normalized '///heads/foo' 'heads/foo'
 invalid_ref_normalized 'foo'
-invalid_ref_normalized '/foo'
+test_have_prereq MINGW || invalid_ref_normalized '/foo'
 invalid_ref_normalized 'heads/foo/../bar'
 invalid_ref_normalized 'heads/./foo'
 invalid_ref_normalized 'heads\foo'
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/8] t9001: do not fail only due to CR/LF issues
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
  2011-10-14 22:53 ` [PATCH 1/8] t1020: disable the pwd test on MinGW Pat Thoyts
  2011-10-14 22:53 ` [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  2011-10-14 22:53 ` [PATCH 4/8] git-svn: On MSYS, escape and quote SVN_SSH also if set by the user Pat Thoyts
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9001-send-email.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 579ddb7..7d75738 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -23,6 +23,7 @@ test_expect_success $PREREQ \
       echo do
       echo "  echo \"!\$a!\""
       echo "done >commandline\$output"
+      test_have_prereq MINGW && echo "dos2unix commandline\$output"
       echo "cat > msgtxt\$output"
       ) >fake.sendmail &&
      chmod +x ./fake.sendmail &&
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/8] git-svn: On MSYS, escape and quote SVN_SSH also if set by the user
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
                   ` (2 preceding siblings ...)
  2011-10-14 22:53 ` [PATCH 3/8] t9001: do not fail only due to CR/LF issues Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  2011-10-14 22:53 ` [PATCH 5/8] t9901: fix line-ending dependency on windows Pat Thoyts
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Sebastian Schuberth

From: Sebastian Schuberth <sschuberth@gmail.com>

While GIT_SSH does not require any escaping / quoting (e.g. for paths
containing spaces), SVN_SSH requires it due to its use in a Perl script.

Previously, SVN_SSH has only been escaped and quoted automatically if it
was unset and thus derived from GIT_SSH. For user convenience, do the
escaping and quoting also for a SVN_SSH set by the user. This way, the
user is able to use the same unescaped and unquoted syntax for GIT_SSH
and SVN_SSH.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
 git-svn.perl |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index a0410f0..3b33379 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -22,14 +22,13 @@ $Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
 $Git::SVN::Ra::_log_window_size = 100;
 $Git::SVN::_minimize_url = 'unset';
 
-if (! exists $ENV{SVN_SSH}) {
-	if (exists $ENV{GIT_SSH}) {
-		$ENV{SVN_SSH} = $ENV{GIT_SSH};
-		if ($^O eq 'msys') {
-			$ENV{SVN_SSH} =~ s/\\/\\\\/g;
-			$ENV{SVN_SSH} =~ s/(.*)/"$1"/;
-		}
-	}
+if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) {
+	$ENV{SVN_SSH} = $ENV{GIT_SSH};
+}
+
+if (exists $ENV{SVN_SSH} && $^O eq 'msys') {
+	$ENV{SVN_SSH} =~ s/\\/\\\\/g;
+	$ENV{SVN_SSH} =~ s/(.*)/"$1"/;
 }
 
 $Git::SVN::Log::TZ = $ENV{TZ};
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/8] t9901: fix line-ending dependency on windows
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
                   ` (3 preceding siblings ...)
  2011-10-14 22:53 ` [PATCH 4/8] git-svn: On MSYS, escape and quote SVN_SSH also if set by the user Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  2011-10-15  5:44   ` Junio C Hamano
  2011-10-14 22:53 ` [PATCH 6/8] t9300: do not run --cat-blob-fd related tests on MinGW Pat Thoyts
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Pat Thoyts

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 t/t9901-git-web--browse.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh
index 7906e5d..1185b42 100755
--- a/t/t9901-git-web--browse.sh
+++ b/t/t9901-git-web--browse.sh
@@ -12,7 +12,7 @@ test_expect_success \
 	echo http://example.com/foo\&bar >expect &&
 	git config browser.custom.cmd echo &&
 	git web--browse --browser=custom \
-		http://example.com/foo\&bar >actual &&
+		http://example.com/foo\&bar | tr -d "\r" >actual &&
 	test_cmp expect actual
 '
 
@@ -21,7 +21,7 @@ test_expect_success \
 	echo http://example.com/foo\;bar >expect &&
 	git config browser.custom.cmd echo &&
 	git web--browse --browser=custom \
-		http://example.com/foo\;bar >actual &&
+		http://example.com/foo\;bar | tr -d "\r" >actual &&
 	test_cmp expect actual
 '
 
@@ -30,7 +30,7 @@ test_expect_success \
 	echo http://example.com/foo#bar >expect &&
 	git config browser.custom.cmd echo &&
 	git web--browse --browser=custom \
-		http://example.com/foo#bar >actual &&
+		http://example.com/foo#bar | tr -d "\r" >actual &&
 	test_cmp expect actual
 '
 
@@ -44,7 +44,7 @@ test_expect_success \
 	chmod +x "fake browser" &&
 	git config browser.w3m.path "`pwd`/fake browser" &&
 	git web--browse --browser=w3m \
-		http://example.com/foo >actual &&
+		http://example.com/foo | tr -d "\r" >actual &&
 	test_cmp expect actual
 '
 
@@ -59,7 +59,7 @@ test_expect_success \
 		}
 		f" &&
 	git web--browse --browser=custom \
-		http://example.com/foo >actual &&
+		http://example.com/foo | tr -d "\r" >actual &&
 	test_cmp expect actual
 '
 
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/8] t9300: do not run --cat-blob-fd related tests on MinGW
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
                   ` (4 preceding siblings ...)
  2011-10-14 22:53 ` [PATCH 5/8] t9901: fix line-ending dependency on windows Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  2011-10-14 22:53 ` [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows Pat Thoyts
  2011-10-14 22:53 ` [PATCH 8/8] mingw: ensure sockets are initialized before calling gethostname Pat Thoyts
  7 siblings, 0 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

As diagnosed by Johannes Sixt, msys.dll does not hand through file
descriptors > 2 to child processes, so these test cases cannot passes when
run through an MSys bash.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9300-fast-import.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index bd32b91..438aaf6 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -2237,7 +2237,7 @@ test_expect_success 'R: cat-blob-fd must be a nonnegative integer' '
 	test_must_fail git fast-import --cat-blob-fd=-1 </dev/null
 '
 
-test_expect_success 'R: print old blob' '
+test_expect_success NOT_MINGW 'R: print old blob' '
 	blob=$(echo "yes it can" | git hash-object -w --stdin) &&
 	cat >expect <<-EOF &&
 	${blob} blob 11
@@ -2249,7 +2249,7 @@ test_expect_success 'R: print old blob' '
 	test_cmp expect actual
 '
 
-test_expect_success 'R: in-stream cat-blob-fd not respected' '
+test_expect_success NOT_MINGW 'R: in-stream cat-blob-fd not respected' '
 	echo hello >greeting &&
 	blob=$(git hash-object -w greeting) &&
 	cat >expect <<-EOF &&
@@ -2270,7 +2270,7 @@ test_expect_success 'R: in-stream cat-blob-fd not respected' '
 	test_cmp expect actual.1
 '
 
-test_expect_success 'R: print new blob' '
+test_expect_success NOT_MINGW 'R: print new blob' '
 	blob=$(echo "yep yep yep" | git hash-object --stdin) &&
 	cat >expect <<-EOF &&
 	${blob} blob 12
@@ -2288,7 +2288,7 @@ test_expect_success 'R: print new blob' '
 	test_cmp expect actual
 '
 
-test_expect_success 'R: print new blob by sha1' '
+test_expect_success NOT_MINGW 'R: print new blob by sha1' '
 	blob=$(echo "a new blob named by sha1" | git hash-object --stdin) &&
 	cat >expect <<-EOF &&
 	${blob} blob 25
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
                   ` (5 preceding siblings ...)
  2011-10-14 22:53 ` [PATCH 6/8] t9300: do not run --cat-blob-fd related tests on MinGW Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  2011-10-15  5:50   ` Junio C Hamano
  2011-10-14 22:53 ` [PATCH 8/8] mingw: ensure sockets are initialized before calling gethostname Pat Thoyts
  7 siblings, 1 reply; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Pat Thoyts

On Windows the bcompare tool launches a graphical program and does
not wait for it to terminate. A separate 'bcomp' tool is provided which
will wait for the view to exit so we use this instead.

Reported-by: Werner BEROUX <werner@beroux.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 mergetools/bc3 |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/mergetools/bc3 b/mergetools/bc3
index 27b3dd4..b642bf2 100644
--- a/mergetools/bc3
+++ b/mergetools/bc3
@@ -16,5 +16,12 @@ merge_cmd () {
 }
 
 translate_merge_tool_path() {
-	echo bcompare
+	case $(uname -s) in
+	*MINGW*)
+		echo bcomp
+		;;
+	*)
+		echo bcompare
+		;;
+	esac
 }
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 8/8] mingw: ensure sockets are initialized before calling gethostname
  2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
                   ` (6 preceding siblings ...)
  2011-10-14 22:53 ` [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows Pat Thoyts
@ 2011-10-14 22:53 ` Pat Thoyts
  7 siblings, 0 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-14 22:53 UTC (permalink / raw
  To: Git; +Cc: Junio C Hamano, msysGit, Pat Thoyts

If the Windows sockets subsystem has not been initialized yet then an
attempt to get the hostname returns an error and prints a warning to the
console. This solves this issue for msysGit as seen with 'git fetch'.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 compat/mingw.c |    7 +++++++
 compat/mingw.h |    3 +++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/compat/mingw.c b/compat/mingw.c
index 8947418..efdc703 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1321,6 +1321,13 @@ static void ensure_socket_initialization(void)
 	initialized = 1;
 }
 
+#undef gethostname
+int mingw_gethostname(char *name, int namelen)
+{
+    ensure_socket_initialization();
+    return gethostname(name, namelen);
+}
+
 #undef gethostbyname
 struct hostent *mingw_gethostbyname(const char *host)
 {
diff --git a/compat/mingw.h b/compat/mingw.h
index ce9dd98..fecf0d0 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -190,6 +190,9 @@ char *mingw_getcwd(char *pointer, int len);
 char *mingw_getenv(const char *name);
 #define getenv mingw_getenv
 
+int mingw_gethostname(char *host, int namelen);
+#define gethostname mingw_gethostname
+
 struct hostent *mingw_gethostbyname(const char *host);
 #define gethostbyname mingw_gethostbyname
 
-- 
1.7.7.1.gbba15

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion
  2011-10-14 22:53 ` [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion Pat Thoyts
@ 2011-10-15  5:36   ` Junio C Hamano
  2011-10-15 13:49     ` Pat Thoyts
  0 siblings, 1 reply; 21+ messages in thread
From: Junio C Hamano @ 2011-10-15  5:36 UTC (permalink / raw
  To: Pat Thoyts; +Cc: Git, msysGit, Johannes Schindelin

Pat Thoyts <patthoyts@users.sourceforge.net> writes:

>  t/t1402-check-ref-format.sh |   15 +++++++++------

Didn't we see a different patch that attempts to address the same issue
recently on the list from J6t, or is this a fix for a different problem?

>  1 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
> index 710fcca..1a5e343 100755
> --- a/t/t1402-check-ref-format.sh
> +++ b/t/t1402-check-ref-format.sh
> @@ -36,7 +36,7 @@ invalid_ref 'refs///heads/foo'
>  valid_ref 'refs///heads/foo' --normalize
>  invalid_ref 'heads/foo/'
>  invalid_ref '/heads/foo'
> -valid_ref '/heads/foo' --normalize
> +test_have_prereq MINGW || valid_ref '/heads/foo' --normalize
>  invalid_ref '///heads/foo'
>  valid_ref '///heads/foo' --normalize
>  invalid_ref './foo'
> @@ -120,9 +120,12 @@ invalid_ref "$ref" --allow-onelevel
>  invalid_ref "$ref" --refspec-pattern
>  invalid_ref "$ref" '--refspec-pattern --allow-onelevel'
>  invalid_ref "$ref" --normalize
> -valid_ref "$ref" '--allow-onelevel --normalize'
> -invalid_ref "$ref" '--refspec-pattern --normalize'
> -valid_ref "$ref" '--refspec-pattern --allow-onelevel --normalize'
> +if test_have_prereq NOT_MINGW
> +then
> +	valid_ref "$ref" '--allow-onelevel --normalize'
> +	invalid_ref "$ref" '--refspec-pattern --normalize'
> +	valid_ref "$ref" '--refspec-pattern --allow-onelevel --normalize'
> +fi
>  
>  test_expect_success "check-ref-format --branch @{-1}" '
>  	T=$(git write-tree) &&
> @@ -166,10 +169,10 @@ invalid_ref_normalized() {
>  
>  valid_ref_normalized 'heads/foo' 'heads/foo'
>  valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo'
> -valid_ref_normalized '/heads/foo' 'heads/foo'
> +test_have_prereq MINGW || valid_ref_normalized '/heads/foo' 'heads/foo'
>  valid_ref_normalized '///heads/foo' 'heads/foo'
>  invalid_ref_normalized 'foo'
> -invalid_ref_normalized '/foo'
> +test_have_prereq MINGW || invalid_ref_normalized '/foo'
>  invalid_ref_normalized 'heads/foo/../bar'
>  invalid_ref_normalized 'heads/./foo'
>  invalid_ref_normalized 'heads\foo'

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/8] t9901: fix line-ending dependency on windows
  2011-10-14 22:53 ` [PATCH 5/8] t9901: fix line-ending dependency on windows Pat Thoyts
@ 2011-10-15  5:44   ` Junio C Hamano
  2011-10-15 12:25     ` Pat Thoyts
  0 siblings, 1 reply; 21+ messages in thread
From: Junio C Hamano @ 2011-10-15  5:44 UTC (permalink / raw
  To: Pat Thoyts; +Cc: Git, msysGit

Pat Thoyts <patthoyts@users.sourceforge.net> writes:

> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
> ---
>  t/t9901-git-web--browse.sh |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh
> index 7906e5d..1185b42 100755
> --- a/t/t9901-git-web--browse.sh
> +++ b/t/t9901-git-web--browse.sh
> @@ -12,7 +12,7 @@ test_expect_success \
>  	echo http://example.com/foo\&bar >expect &&
>  	git config browser.custom.cmd echo &&
>  	git web--browse --browser=custom \
> -		http://example.com/foo\&bar >actual &&
> +		http://example.com/foo\&bar | tr -d "\r" >actual &&
>  	test_cmp expect actual
>  '

This is unnice for two reasons. We have web--browse five times in this
test script, and you add tr exactly the same way to each and every one of
them. And you are losing the error condition from each and every one of
these web--browse invocations.

Having to do the same change to all invocations of the same command
suggests that perhaps you can and should wrap that pattern into a single
helper, perhaps like:

test_web_browse () {
	# browser=$1 url=$2
	git web--browse --browser="$1" "$2" >actual &&
        tr -d '\015' <actual >text &&
        test_cmp expect text
}

or something?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-14 22:53 ` [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows Pat Thoyts
@ 2011-10-15  5:50   ` Junio C Hamano
  2011-10-15 10:27     ` Sebastian Schuberth
  0 siblings, 1 reply; 21+ messages in thread
From: Junio C Hamano @ 2011-10-15  5:50 UTC (permalink / raw
  To: Pat Thoyts; +Cc: Git, msysGit

Pat Thoyts <patthoyts@users.sourceforge.net> writes:

> On Windows the bcompare tool launches a graphical program and does
> not wait for it to terminate. A separate 'bcomp' tool is provided which
> will wait for the view to exit so we use this instead.

Hmm, does this only apply to Windows, or are there other platforms on
which BC3 supplies bcomp for the exact same reason? What I am trying to
get at is that it might be nicer if we do not have to check uname, e.g.

	if type bcomp >/dev/null 2>/dev/null
        then
        	echo bcomp
	else
        	echo bcompare
	fi

> Reported-by: Werner BEROUX <werner@beroux.com>
> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
> ---
>  mergetools/bc3 |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/mergetools/bc3 b/mergetools/bc3
> index 27b3dd4..b642bf2 100644
> --- a/mergetools/bc3
> +++ b/mergetools/bc3
> @@ -16,5 +16,12 @@ merge_cmd () {
>  }
>  
>  translate_merge_tool_path() {
> -	echo bcompare
> +	case $(uname -s) in
> +	*MINGW*)
> +		echo bcomp
> +		;;
> +	*)
> +		echo bcompare
> +		;;
> +	esac
>  }

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-15  5:50   ` Junio C Hamano
@ 2011-10-15 10:27     ` Sebastian Schuberth
  2011-10-15 12:39       ` Pat Thoyts
  2011-10-15 20:14       ` Junio C Hamano
  0 siblings, 2 replies; 21+ messages in thread
From: Sebastian Schuberth @ 2011-10-15 10:27 UTC (permalink / raw
  To: git; +Cc: msysgit

On 15.10.2011 07:50, Junio C Hamano wrote:

> Hmm, does this only apply to Windows, or are there other platforms on
> which BC3 supplies bcomp for the exact same reason? What I am trying to

BC3 is only available for Linux and Windows, so it only applies to 
Windows currently.

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/8] t9901: fix line-ending dependency on windows
  2011-10-15  5:44   ` Junio C Hamano
@ 2011-10-15 12:25     ` Pat Thoyts
  0 siblings, 0 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-15 12:25 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Git, msysGit

Junio C Hamano <gitster@pobox.com> writes:

>Pat Thoyts <patthoyts@users.sourceforge.net> writes:
>
>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
>> ---
>>  t/t9901-git-web--browse.sh |   10 +++++-----
>>  1 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh
>> index 7906e5d..1185b42 100755
>> --- a/t/t9901-git-web--browse.sh
>> +++ b/t/t9901-git-web--browse.sh
>> @@ -12,7 +12,7 @@ test_expect_success \
>>  	echo http://example.com/foo\&bar >expect &&
>>  	git config browser.custom.cmd echo &&
>>  	git web--browse --browser=custom \
>> -		http://example.com/foo\&bar >actual &&
>> +		http://example.com/foo\&bar | tr -d "\r" >actual &&
>>  	test_cmp expect actual
>>  '
>
>This is unnice for two reasons. We have web--browse five times in this
>test script, and you add tr exactly the same way to each and every one of
>them. And you are losing the error condition from each and every one of
>these web--browse invocations.
>
>Having to do the same change to all invocations of the same command
>suggests that perhaps you can and should wrap that pattern into a single
>helper, perhaps like:
>
>test_web_browse () {
>	# browser=$1 url=$2
>	git web--browse --browser="$1" "$2" >actual &&
>        tr -d '\015' <actual >text &&
>        test_cmp expect text
>}
>
>or something?

OK - The suggested code works fine so I shall re-roll this one shortly.
-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-15 10:27     ` Sebastian Schuberth
@ 2011-10-15 12:39       ` Pat Thoyts
  2011-10-16 10:12         ` Sebastian Schuberth
  2011-10-16 10:21         ` Sebastian Schuberth
  2011-10-15 20:14       ` Junio C Hamano
  1 sibling, 2 replies; 21+ messages in thread
From: Pat Thoyts @ 2011-10-15 12:39 UTC (permalink / raw
  To: Sebastian Schuberth; +Cc: Junio C Hamano, Git, msysGit

Sebastian Schuberth <sschuberth@gmail.com> writes:

>On 15.10.2011 07:50, Junio C Hamano wrote:
>
>> Hmm, does this only apply to Windows, or are there other platforms on
>> which BC3 supplies bcomp for the exact same reason? What I am trying to
>
>BC3 is only available for Linux and Windows, so it only applies to
>Windows currently.

And checking the linux distribution shows only a bcompare executable so
testing for the presence of 'bcomp' will be fine.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion
  2011-10-15  5:36   ` Junio C Hamano
@ 2011-10-15 13:49     ` Pat Thoyts
  2011-10-15 20:15       ` Junio C Hamano
  0 siblings, 1 reply; 21+ messages in thread
From: Pat Thoyts @ 2011-10-15 13:49 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Git, msysGit, Johannes Schindelin

Junio C Hamano <gitster@pobox.com> writes:

>Pat Thoyts <patthoyts@users.sourceforge.net> writes:
>
>>  t/t1402-check-ref-format.sh |   15 +++++++++------
>
>Didn't we see a different patch that attempts to address the same issue
>recently on the list from J6t, or is this a fix for a different problem?
>

You are correct - I'll leave this out of this series then. j6t's patch
is an alternative fix for the same problem.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-15 10:27     ` Sebastian Schuberth
  2011-10-15 12:39       ` Pat Thoyts
@ 2011-10-15 20:14       ` Junio C Hamano
  2011-10-16 10:11         ` Sebastian Schuberth
  1 sibling, 1 reply; 21+ messages in thread
From: Junio C Hamano @ 2011-10-15 20:14 UTC (permalink / raw
  To: Sebastian Schuberth; +Cc: git, msysgit

Sebastian Schuberth <sschuberth@gmail.com> writes:

> On 15.10.2011 07:50, Junio C Hamano wrote:
>
>> Hmm, does this only apply to Windows, or are there other platforms on
>> which BC3 supplies bcomp for the exact same reason? What I am trying to
>
> BC3 is only available for Linux and Windows, so it only applies to
> Windows currently.

Who asked anything about "currently"?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion
  2011-10-15 13:49     ` Pat Thoyts
@ 2011-10-15 20:15       ` Junio C Hamano
  0 siblings, 0 replies; 21+ messages in thread
From: Junio C Hamano @ 2011-10-15 20:15 UTC (permalink / raw
  To: Pat Thoyts; +Cc: Git, msysGit, Johannes Schindelin

Pat Thoyts <patthoyts@users.sourceforge.net> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>>Pat Thoyts <patthoyts@users.sourceforge.net> writes:
>>
>>>  t/t1402-check-ref-format.sh |   15 +++++++++------
>>
>>Didn't we see a different patch that attempts to address the same issue
>>recently on the list from J6t, or is this a fix for a different problem?
>>
>
> You are correct - I'll leave this out of this series then. j6t's patch
> is an alternative fix for the same problem.

Thanks for checking.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-15 20:14       ` Junio C Hamano
@ 2011-10-16 10:11         ` Sebastian Schuberth
  0 siblings, 0 replies; 21+ messages in thread
From: Sebastian Schuberth @ 2011-10-16 10:11 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git, msysgit

On Sat, Oct 15, 2011 at 22:14, Junio C Hamano <gitster@pobox.com> wrote:

>>> Hmm, does this only apply to Windows, or are there other platforms on
>>> which BC3 supplies bcomp for the exact same reason? What I am trying to
>>
>> BC3 is only available for Linux and Windows, so it only applies to
>> Windows currently.
>
> Who asked anything about "currently"?

Heh, no one. But obviously I cannot predict the future, that's why I
explicitly said "currently".

Here's what I was meaning to say in more long-winded words: Although
BC3 only supports Linux and Windows currently, IMHO it is unlikely
that future support for other platforms will suffer from the same
issue as Windows and will require a different executable than
"bcompare". And even if it was the case, that could be fixed then. For
now the proposed patch covers all cases and works well, and although
your suggestion would be more generic, it's not necessary, and the
discussion about whether or not to use your more generic approach is
starting to outweigh the time that was required to write this patch as
well as the time that would be required for a future patch.

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-15 12:39       ` Pat Thoyts
@ 2011-10-16 10:12         ` Sebastian Schuberth
  2011-10-16 10:21         ` Sebastian Schuberth
  1 sibling, 0 replies; 21+ messages in thread
From: Sebastian Schuberth @ 2011-10-16 10:12 UTC (permalink / raw
  To: Pat Thoyts; +Cc: Junio C Hamano, Git, msysGit

On Sat, Oct 15, 2011 at 14:39, Pat Thoyts
<patthoyts@users.sourceforge.net> wrote:

> And checking the linux distribution shows only a bcompare executable so
> testing for the presence of 'bcomp' will be fine.

That's what I was implying, sorry for not being more clear. I also
checked the Linux version of BC3 to verify that it only contains a
"bcompare" executable.

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows
  2011-10-15 12:39       ` Pat Thoyts
  2011-10-16 10:12         ` Sebastian Schuberth
@ 2011-10-16 10:21         ` Sebastian Schuberth
  1 sibling, 0 replies; 21+ messages in thread
From: Sebastian Schuberth @ 2011-10-16 10:21 UTC (permalink / raw
  To: Pat Thoyts; +Cc: Junio C Hamano, Git, msysGit

On Sat, Oct 15, 2011 at 14:39, Pat Thoyts
<patthoyts@users.sourceforge.net> wrote:

> And checking the linux distribution shows only a bcompare executable so
> testing for the presence of 'bcomp' will be fine.

I was meaning to say the same thing, sorry for not being more clear. I
also checked the Linux version of BC3 and verified that there's only a
"bcompare" executable.

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-10-16 10:22 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-14 22:53 [PATCH 0/8] Some patches from msysGit Pat Thoyts
2011-10-14 22:53 ` [PATCH 1/8] t1020: disable the pwd test on MinGW Pat Thoyts
2011-10-14 22:53 ` [PATCH 2/8] t1402: Ignore a few cases that must fail due to DOS path expansion Pat Thoyts
2011-10-15  5:36   ` Junio C Hamano
2011-10-15 13:49     ` Pat Thoyts
2011-10-15 20:15       ` Junio C Hamano
2011-10-14 22:53 ` [PATCH 3/8] t9001: do not fail only due to CR/LF issues Pat Thoyts
2011-10-14 22:53 ` [PATCH 4/8] git-svn: On MSYS, escape and quote SVN_SSH also if set by the user Pat Thoyts
2011-10-14 22:53 ` [PATCH 5/8] t9901: fix line-ending dependency on windows Pat Thoyts
2011-10-15  5:44   ` Junio C Hamano
2011-10-15 12:25     ` Pat Thoyts
2011-10-14 22:53 ` [PATCH 6/8] t9300: do not run --cat-blob-fd related tests on MinGW Pat Thoyts
2011-10-14 22:53 ` [PATCH 7/8] mergetools: use the correct tool for Beyond Compare 3 on Windows Pat Thoyts
2011-10-15  5:50   ` Junio C Hamano
2011-10-15 10:27     ` Sebastian Schuberth
2011-10-15 12:39       ` Pat Thoyts
2011-10-16 10:12         ` Sebastian Schuberth
2011-10-16 10:21         ` Sebastian Schuberth
2011-10-15 20:14       ` Junio C Hamano
2011-10-16 10:11         ` Sebastian Schuberth
2011-10-14 22:53 ` [PATCH 8/8] mingw: ensure sockets are initialized before calling gethostname Pat Thoyts

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).