[PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

Subsystems: the rest

STALE3588d

5 messages, 3 authors, 2016-10-10 · open the first message on its own page

[PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

From: Jeremy Huddleston Sequoia <hidden>
Date: 2016-10-10 03:11:46

Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae
Signed-off-by: Jeremy Huddleston Sequoia <redacted>
CC: Josh Triplett <josh@joshtriplett.org>
CC: Junio C Hamano <redacted>
---
 t/t4014-format-patch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 8d90a6e..33f6940 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -754,7 +754,7 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' '
 	git format-patch --ignore-if-in-upstream HEAD
 '
 
-git_version="$(git --version | sed "s/.* //")"
+git_version="$(git --version | sed "s/git version //")"
 
 signature() {
 	printf "%s\n%s\n\n" "-- " "${1:-$git_version}"
-- 
2.10.1 (Apple Git-99)

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

From: Josh Triplett <josh@joshtriplett.org>
Date: 2016-10-10 03:04:38

On October 9, 2016 7:53:23 PM PDT, Jeremy Huddleston Sequoia [off-list ref] wrote:
Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae
Signed-off-by: Jeremy Huddleston Sequoia <redacted>
CC: Josh Triplett <josh@joshtriplett.org>
CC: Junio C Hamano <redacted>
Looks reasonable to me. Didn't realize git versions could have spaces.
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
quoted hunk
t/t4014-format-patch.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 8d90a6e..33f6940 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -754,7 +754,7 @@ test_expect_success 'format-patch
--ignore-if-in-upstream HEAD' '
	git format-patch --ignore-if-in-upstream HEAD
'

-git_version="$(git --version | sed "s/.* //")"
+git_version="$(git --version | sed "s/git version //")"

signature() {
	printf "%s\n%s\n\n" "-- " "${1:-$git_version}"

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

From: Jeremy Huddleston Sequoia <hidden>
Date: 2016-10-10 04:09:08

On Oct 9, 2016, at 20:04, Josh Triplett [off-list ref] wrote:

On October 9, 2016 7:53:23 PM PDT, Jeremy Huddleston Sequoia [off-list ref] wrote:
quoted
Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae
Signed-off-by: Jeremy Huddleston Sequoia <redacted>
CC: Josh Triplett <josh@joshtriplett.org>
CC: Junio C Hamano <redacted>
Looks reasonable to me. Didn't realize git versions could have spaces.
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Thanks, Josh.

If anyone feels strongly that they shouldn't, I'd be happy to change our DEF_VER patch to play nicer.

cf https://github.com/jeremyhu/git/commit/f99905d0752d923e5ec61e14c675a300c6d04284
quoted
t/t4014-format-patch.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 8d90a6e..33f6940 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -754,7 +754,7 @@ test_expect_success 'format-patch
--ignore-if-in-upstream HEAD' '
	git format-patch --ignore-if-in-upstream HEAD
'

-git_version="$(git --version | sed "s/.* //")"
+git_version="$(git --version | sed "s/git version //")"

signature() {
	printf "%s\n%s\n\n" "-- " "${1:-$git_version}"

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

From: Jeff King <hidden>
Date: 2016-10-10 13:11:02

On Sun, Oct 09, 2016 at 07:53:23PM -0700, Jeremy Huddleston Sequoia wrote:
Subject: Re: [PATCH] t4014-format-patch: Adjust git_version regex to better
 handle distro changes to DEF_VER

Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae
Signed-off-by: Jeremy Huddleston Sequoia <redacted>
I see there was a discussion elsewhere on the list about exactly what
you are putting into DEF_VAR that causes the problem. Perhaps the commit
message here would be a good place to mention that, why the current
regex breaks it, and why your new version fixes not only it, but other
possible values of DEF_VAR.

-Peff

Re: [PATCH] t4014-format-patch: Adjust git_version regex to better handle distro changes to DEF_VER

From: Jeremy Huddleston Sequoia <hidden>
Date: 2016-10-10 16:37:51

On Oct 10, 2016, at 06:10, Jeff King [off-list ref] wrote:

On Sun, Oct 09, 2016 at 07:53:23PM -0700, Jeremy Huddleston Sequoia wrote:
quoted
Subject: Re: [PATCH] t4014-format-patch: Adjust git_version regex to better
handle distro changes to DEF_VER

Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae
Signed-off-by: Jeremy Huddleston Sequoia <redacted>
I see there was a discussion elsewhere on the list about exactly what
you are putting into DEF_VAR that causes the problem. Perhaps the commit
message here would be a good place to mention that, why the current
regex breaks it, and why your new version fixes not only it, but other
possible values of DEF_VAR.
Thanks, I've added this blurb:

For example, git distributed with Apple's Xcode reports a version like:
    git version 2.9.3 (Apple Git-75)

Apple started doing this to help customers distinguish between different
versions of their packaged git which have the same base version (eg: with
different patches applied).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help