From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Stefan Beller <sbeller@google.com>, git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jun 2015, #06; Wed, 24)
Date: Thu, 25 Jun 2015 06:14:31 -0700 [thread overview]
Message-ID: <xmqqtwtw0w20.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <d825b05938778f4ee911cbb8c3c8573b@www.dscho.org> (Johannes Schindelin's message of "Thu, 25 Jun 2015 13:04:30 +0200")
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> - I *think* that the current `recreate_opt()` is fine, but if it
> is used more, we will have to quote the arguments to guard against
> spaces and quotes and whatnot
I admit that that was the reaction I had when I saw it for the first
time, until I realized how it is used. And this one I have to
disagree. recreate-opt is used to munge a single argument, suitable
to be placed into argv[] for execv() like thing---there is no need
for shell quoting there. It is a job for the caller that gets its
result to shell quote if it wants to pass the result to a shell.
So I think this is fine as-is.
> - There is a loop
>
> for (; *argv; argv++)
> argv_array_push(array, *argv);
>
> which might want to be written as
>
> while (*argv)
> argv_array_push(array, *(argv)++);
Yeah, the latter is certainly more readable, but I agree this is not
a showstopper. I'd gladly take an incremental to update it, though
;-)
Thanks, both.
next prev parent reply other threads:[~2015-06-25 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-24 21:14 What's cooking in git.git (Jun 2015, #06; Wed, 24) Junio C Hamano
2015-06-25 1:01 ` Stefan Beller
2015-06-25 11:04 ` Johannes Schindelin
2015-06-25 13:14 ` Junio C Hamano [this message]
2015-06-25 18:14 ` Johannes Schindelin
2015-06-29 14:32 ` Tony Finch
2015-06-29 20:02 ` Torsten Bögershausen
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=xmqqtwtw0w20.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=sbeller@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.