public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: merlyn@stonehenge•com (Randal L. Schwartz)
To: David Kastrup <dak@gnu•org>
Cc: Junio C Hamano <gitster@pobox•com>, Mike Hommey <mh@glandium•org>,
	git@vger•kernel.org
Subject: Re: [PATCH] git-send-email.perl: Really add angle brackets to  In-Reply-To if necessary
Date: Sun, 09 Dec 2007 10:53:46 -0800	[thread overview]
Message-ID: <86aboju2bp.fsf@blue.stonehenge.com> (raw)
In-Reply-To: <851w9vsp8o.fsf@lola.goethe.zz> (David Kastrup's message of "Sun, 09 Dec 2007 19:21:43 +0100")

>>>>> "David" == David Kastrup <dak@gnu•org> 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@stonehenge•com> <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!

  reply	other threads:[~2007-12-09 18:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09 17:04 [PATCH 1/4] Cleanup variables in http.[ch] Mike Hommey
2007-12-09 17:04 ` [PATCH 2/4] Use strbuf in http code Mike Hommey
2007-12-09 17:04   ` [PATCH 3/4] Move the file read logic to read_patch_file() in builtin-apply.c Mike Hommey
2007-12-09 17:05     ` [PATCH 4/4] Add support for URLs to git-apply Mike Hommey
2007-12-10  9:06       ` [Replacement PATCH " Mike Hommey
2007-12-09 18:27     ` [PATCH 3/4] Move the file read logic to read_patch_file() in builtin-apply.c Junio C Hamano
2007-12-09 18:15   ` [PATCH 2/4] Use strbuf in http code Junio C Hamano
2007-12-09 18:24     ` Mike Hommey
2007-12-09 18:36       ` Junio C Hamano
2007-12-09 19:30         ` [Resend PATCH " Mike Hommey
2007-12-11  6:04           ` Junio C Hamano
2007-12-11  6:16             ` Mike Hommey
2007-12-11  6:25               ` [Replacement " Mike Hommey
2007-12-09 17:17 ` [PATCH] git-send-email.perl: Really add angle brackets to In-Reply-To if necessary Mike Hommey
2007-12-09 17:38   ` Mike Hommey
2007-12-09 18:09   ` Junio C Hamano
2007-12-09 18:14     ` Mike Hommey
2007-12-09 18:21     ` David Kastrup
2007-12-09 18:53       ` Randal L. Schwartz [this message]
2007-12-09 19:46         ` David Kastrup
2007-12-09 19:51           ` Randal L. Schwartz
2007-12-09 19:58             ` [Resend PATCH] " Mike Hommey
2007-12-09 18:21 ` [PATCH 1/4] Cleanup variables in http.[ch] Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86aboju2bp.fsf@blue.stonehenge.com \
    --to=merlyn@stonehenge$(echo .)com \
    --cc=dak@gnu$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=mh@glandium$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox