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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "David" == David Kastrup <dak@xxxxxxx> writes:

>>> $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.

David> The original line read

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

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

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

I think what you were trying to do would work with:

  for ($initial_reply_to) {
      s/^\s*<?/</;
      s/>?\s*$/>/;
  }

Untested, but I get this stuff right most of the time. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux