[Patch v2 1/4] nmbug: use dump --format=batch-tag

Tomi Ollila tomi.ollila at iki.fi
Thu Feb 21 04:22:42 PST 2013


On Thu, Feb 21 2013, David Bremner <david at tethera.net> wrote:

> Tomi Ollila <tomi.ollila at iki.fi> writes:
>
>>
>> This patch series looks good to me (as far as I can understand, I did
>> not find the "silly bug" in your previous patch...)
>>
>
> Compare :
>
> +    print $notmuch $A_action.$TAGPREFIX.$pair->{tag}, " -- ",
> +      'id:'.$pair->{id};
>
> vs.
>
> +    print $notmuch $D_action.$TAGPREFIX.$pair->{tag},
> +      'id:'.$pair->{id};

Ah, ok :)

> I obviously did not test that version very well.

IIRC that has happened to some other people, too ;(

>> Instead of mentioning that "calls are _not_ passed to shell" here,
>> that could be briefly mentioned just before system() calls in the
>> script -- and that definitely should not be 'At the moment' feature.
>
> Sure, the "At the moment" is meant to modify "relies". In the next
> patch, we stop relying on this feature of Perl.

Well, one have to expect the execution to happen one way or another
(and arrange quoting accordingly); for example:

$ echo; perl -e 'exec q/echo "foobar"/'

foobar

vs.

$ echo; perl -e 'exec qw/echo "foobar"/'

"foobar"

first gave exec one arg, 'echo "foobar"' and due to "":s perl used sh
to execute it, second gave exec list [ 'echo', '"foobar"' ] and therefore
echo got foobar with quotes as a command line argument.

Anyone interested for more information, see 'perldoc -f exec'.


>> the system() function in perl(1) never pass execution through the
>> shell in case the args are list more than one arg:
>
> right. that's what I meant by "is a documented feature of perl's system
> function"
>
> So I think we mean to say the same thing here; but I could I add a
> comment in this patch (to delete it in the next). Or maybe reword that
> commit message somehow.

Yes, the message is the same, just that there should not be need for that..

> d

Tomi


More information about the notmuch mailing list