# [PATCH] Brown paper bag fix to previous send-email change

5 messages from 2007-12-11 to 2007-12-11. Participants: Mike Hommey, Junio C Hamano.
Thread: https://gitlist.dev/t/11235

## Mike Hommey, 2007-12-11 06:55

Subject: [PATCH] Brown paper bag fix to previous send-email change
Message-ID: <1197356116-12176-1-git-send-email-mh@glandium.org>
URL: https://gitlist.dev/e/1197356116-12176-1-git-send-email-mh%40glandium.org

```
My previous change led to the In-Reply-To header being <> when the given
value was empty. This fixes it.

Signed-off-by: Mike Hommey <mh@glandium.org>
---

 I think I have an antispam problem somewhere with this patch, because even
 keeping sending it, it never reached the list. And Junio didn't answer to my
 private message about it, so I guess that was some server being smart with
 the subject line. *sigh*

 PS: sorry Junio if you get this patch multiple time.

 git-send-email.perl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index c0e1dd3..0e8c457 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -369,8 +369,10 @@ if ($thread && !defined $initial_reply_to && $prompting) {
 	$initial_reply_to = $_;
 }
 
-$initial_reply_to =~ s/^\s*<?/</;
-$initial_reply_to =~ s/>?\s*$/>/;
+if ($initial_reply_to) {
+	$initial_reply_to =~ s/^\s*<?/</;
+	$initial_reply_to =~ s/>?\s*$/>/;
+}
 
 if (!defined $smtp_server) {
 	foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
-- 
1.5.3.7.1161.g14b8

```

## Junio C Hamano, 2007-12-11 07:04

Subject: Re: [PATCH] Brown paper bag fix to previous send-email change
Message-ID: <7v3au9hfuj.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v3au9hfuj.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1197356116-12176-1-git-send-email-mh@glandium.org>

```
Mike Hommey <mh@glandium.org> writes:

> My previous change led to the In-Reply-To header being <> when the given
> value was empty. This fixes it.
>
> Signed-off-by: Mike Hommey <mh@glandium.org>
> ---
>
>  I think I have an antispam problem somewhere with this patch, because even
>  keeping sending it, it never reached the list. And Junio didn't answer to my
>  private message about it, so I guess that was some server being smart with
>  the subject line. *sigh*
>
>  PS: sorry Junio if you get this patch multiple time.

No, I happened to have noticed the same and have an almost identical fix
(I said "defined $initial_reply_to") already queued in my tree.

```

## Mike Hommey, 2007-12-11 07:44

Subject: Re: [PATCH] Brown paper bag fix to previous send-email change
Message-ID: <20071211074427.GA12959@glandium.org>
URL: https://gitlist.dev/e/20071211074427.GA12959%40glandium.org
In-Reply-To: <7v3au9hfuj.fsf@gitster.siamese.dyndns.org>

```
On Mon, Dec 10, 2007 at 11:04:36PM -0800, Junio C Hamano wrote:
> Mike Hommey <mh@glandium.org> writes:
> 
> > My previous change led to the In-Reply-To header being <> when the given
> > value was empty. This fixes it.
> >
> > Signed-off-by: Mike Hommey <mh@glandium.org>
> > ---
> >
> >  I think I have an antispam problem somewhere with this patch, because even
> >  keeping sending it, it never reached the list. And Junio didn't answer to my
> >  private message about it, so I guess that was some server being smart with
> >  the subject line. *sigh*
> >
> >  PS: sorry Junio if you get this patch multiple time.
> 
> No, I happened to have noticed the same and have an almost identical fix
> (I said "defined $initial_reply_to") already queued in my tree.

Testing "defined $initial_reply_to" might not be enough, because $initial_reply_to
can be defined and empty.

Mike

```

## Junio C Hamano, 2007-12-11 08:02

Subject: Re: [PATCH] Brown paper bag fix to previous send-email change
Message-ID: <7vsl29fym6.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vsl29fym6.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20071211074427.GA12959@glandium.org>

```
Mike Hommey <mh@glandium.org> writes:

> On Mon, Dec 10, 2007 at 11:04:36PM -0800, Junio C Hamano wrote:
>> Mike Hommey <mh@glandium.org> writes:
>> 
>> > My previous change led to the In-Reply-To header being <> when the given
>> > value was empty. This fixes it.
>> >
>> > Signed-off-by: Mike Hommey <mh@glandium.org>
>> > ---
>> >
>> >  I think I have an antispam problem somewhere with this patch, because even
>> >  keeping sending it, it never reached the list. And Junio didn't answer to my
>> >  private message about it, so I guess that was some server being smart with
>> >  the subject line. *sigh*
>> >
>> >  PS: sorry Junio if you get this patch multiple time.
>> 
>> No, I happened to have noticed the same and have an almost identical fix
>> (I said "defined $initial_reply_to") already queued in my tree.
>
> Testing "defined $initial_reply_to" might not be enough, because $initial_reply_to
> can be defined and empty.

And if empty what does your regexp do?  Produce "<>"?  How's that
useful?

```

## Junio C Hamano, 2007-12-11 08:06

Subject: Re: [PATCH] Brown paper bag fix to previous send-email change
Message-ID: <7vlk81fyfl.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vlk81fyfl.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20071211074427.GA12959@glandium.org>

```
Mike Hommey <mh@glandium.org> writes:

>> No, I happened to have noticed the same and have an almost identical fix
>> (I said "defined $initial_reply_to") already queued in my tree.
>
> Testing "defined $initial_reply_to" might not be enough, because $initial_reply_to
> can be defined and empty.

Ah, I see what you mean.  Thanks.

```
