public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Julia Lawall <julia@diku.dk>, git <git@vger.kernel.org>,
	Vasiliy Kulikov <segooon@gmail.com>,
	matt mooney <mfmooney@gmail.com>,
	kernel-janitors@vger.kernel.org,
	Dan Carpenter <error27@gmail.com>
Subject: Re: [RFC PATCH] sit-send-email.pl: Add --to-cmd
Date: Thu, 23 Sep 2010 17:46:33 +0000	[thread overview]
Message-ID: <1285263993.31572.25.camel@Joe-Laptop> (raw)
In-Reply-To: <AANLkTin_Y8w4ujNGTqGJPNDNfYz7hcjBVLcOG0emBjYn@mail.gmail.com>

On Thu, 2010-09-23 at 17:29 +0000, Ævar Arnfjörð Bjarmason wrote:
> On Thu, Sep 23, 2010 at 17:17, Joe Perches <joe@perches.com> wrote:
> > I know there's a test harness in git, but
> > I don't know how to wire up the new options.
> You'd add the tests to t9001-send-email.sh and --tocmd out to some
> program you create. Is there anything in particular you need help
> with?

Just the doing.  I was (am) being lazy.

> > -if (!@to) {
> > +if (!@to && $to_cmd eq "") {
> 
> Why compare $to_cmd to "" instead of checking definedness?

No real reason.  Using define is the style used in the rest of
the file and it should be changed.

> > @@ -1238,6 +1242,23 @@ foreach my $t (@files) {
> >        }
> >        close F;
> >
> > +       if (defined $to_cmd) {
> > +               open(F, "$to_cmd \Q$t\E |")
> 
> quotemeta() is for escaping regexes, not shell syntax. You probably
> want IPC::Open2 or PC::Open3's functions which'll escape arguments for
> you.

I just copied the style from the equivalent cc_cmd section below,
so if it's necessary, it should be changed there too.

> I.e. do you need to strip whitespace from the beginning of the string?

I think so.



  reply	other threads:[~2010-09-23 17:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTinsM5jdU194FR8L3hTvBXk0Tr_oV2E5752NOUpq@mail.gmail.com>
2010-09-23  7:11 ` threaded patch series matt mooney
2010-09-23  7:36   ` Joe Perches
2010-09-23  8:55   ` Julia Lawall
2010-09-23  9:05     ` Joe Perches
2010-09-23  9:09   ` Vasiliy Kulikov
2010-09-23 12:00   ` Vasiliy Kulikov
2010-09-23 14:57   ` Joe Perches
2010-09-23 15:58   ` Julia Lawall
2010-09-23 17:17     ` [RFC PATCH] sit-send-email.pl: Add --to-cmd Joe Perches
2010-09-23 17:29       ` Ævar Arnfjörð Bjarmason
2010-09-23 17:46         ` Joe Perches [this message]
2010-09-23 17:50           ` Ævar Arnfjörð Bjarmason
2010-09-23 18:45             ` [PATCH V2] git-send-email.perl: " Joe Perches
2010-09-23 19:57               ` matt mooney
2010-09-23 22:37               ` Junio C Hamano
2010-09-23 23:16                 ` Ævar Arnfjörð Bjarmason
2010-09-24  1:18                 ` [PATCH V3] " Joe Perches
2010-09-24 15:32                   ` Jakub Narebski
2010-09-24 16:06                     ` Joe Perches
2010-09-24 16:47                       ` Ævar Arnfjörð Bjarmason
2010-09-24 17:03                         ` [PATCH V4] " Joe Perches
2010-09-24  1:20                 ` [PATCH V2] " Joe Perches
2010-09-23 18:01   ` threaded patch series matt mooney

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=1285263993.31572.25.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=avarab@gmail.com \
    --cc=error27@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=mfmooney@gmail.com \
    --cc=segooon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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