git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] sit-send-email.pl: Add --to-cmd

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 23, 2010, 17:50 UTC
Message-ID
<AANLkTinCx=+n6bMZw4tQqrQ7WC1o_aeGG_n_PxywTyb8@mail.gmail.com>
In-Reply-To
<1285263993.31572.25.camel@Joe-Laptop>
On Thu, Sep 23, 2010 at 17:46, Joe Perches <joe@perches.com> wrote:
Show 35 quoted lines
> 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.

This all sounds reasonable, but I really need to go through git-send-email.perl and fix all these bugs at some point...

Previous: Joe PerchesNext: Joe Perches
Message 5 of 15 in “Re: threaded patch series”
  1. Joe PerchesSep 23, 2010
  2. sit-send-email.pl: Add --to-cmdJoe Perches, Sep 23, 2010
  3. Ævar Arnfjörð BjarmasonSep 23, 2010
  4. Joe PerchesSep 23, 2010
  5. Ævar Arnfjörð BjarmasonSep 23, 2010
  6. git-send-email.perl: Add --to-cmdJoe Perches, Sep 23, 2010
  7. matt mooneySep 23, 2010
  8. Junio C HamanoSep 23, 2010
  9. Ævar Arnfjörð BjarmasonSep 23, 2010
  10. git-send-email.perl: Add --to-cmdJoe Perches, Sep 24, 2010
  11. Jakub NarebskiSep 24, 2010
  12. Joe PerchesSep 24, 2010
  13. Ævar Arnfjörð BjarmasonSep 24, 2010
  14. git-send-email.perl: Add --to-cmdJoe Perches, Sep 24, 2010
  15. Joe PerchesSep 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.