Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git-send-email.perl: Really add angle brackets to In-Reply-To if necessary

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:57

Junio C Hamano [off-list ref] writes:
Mike Hommey [off-list ref] writes:
quoted
3803bcea tried to fix this, but it only adds the branckes when the given
In-Reply-To begins and ends with whitespaces. It also didn't do anything
to the --in-reply-to argument.

Signed-off-by: Mike Hommey <redacted>
---

I just got bitten by this...
Interesting.
Ouch.
quoted
 git-send-email.perl |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 76baa8e..1434eb2 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -367,10 +367,11 @@ if ($thread && !defined $initial_reply_to && $prompting) {
 	} while (!defined $_);
 
 	$initial_reply_to = $_;
-	$initial_reply_to =~ s/^\s+<?/</;
-	$initial_reply_to =~ s/>?\s+$/>/;
 }
I wonder what the original rationale for these \s+ was.
Will apply, anyway.  Thanks.
The original line read

	$initial_reply_to =~ s/(^\s+|\s+$)//g;

and was used just for stripping spaces (no stripping necessary when
there is no space, so \s+ was ok).  The change was supposed to work
on the brackets, too.

That Mike got bitten here is proof that the original idea had merit.
Too bad the implementation did not actually work.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help