From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] Prepare execv_git_cmd() for removal of builtins from the filesystem
Date: Sun, 2 Dec 2007 09:48:46 +0100 [thread overview]
Message-ID: <200712020948.47084.chriscool@tuxfamily.org> (raw)
In-Reply-To: <1196579005-5662-1-git-send-email-gitster@pobox.com>
Le dimanche 2 décembre 2007, Junio C Hamano a écrit :
> + for (argc = 0; argv[argc]; argc++)
> + ; /* just counting */
> + nargv = xmalloc(sizeof(*nargv) * (argc + 2));
>
> - trace_argv_printf(argv, -1, "trace: exec:");
> + nargv[0] = "git";
> + for (argc = 0; argv[argc]; argc++)
> + nargv[argc + 1] = argv[argc];
> + nargv[argc + 1] = NULL;
> + trace_argv_printf(nargv, -1, "trace: exec:");
Minor nit: now that the number of arguments is known, we could perhaps use
the argument count instead of -1 in trace_argv_printf, so that it is not
computed again in quote.c:sq_quote_argv, like this:
trace_argv_printf(nargv, argc + 1, "trace: exec:");
Christian.
prev parent reply other threads:[~2007-12-02 8:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-02 7:03 [PATCH 1/3] Prepare execv_git_cmd() for removal of builtins from the filesystem Junio C Hamano
2007-12-02 7:03 ` [PATCH 2/3] Avoid double exec() in execv_git_cmd() Junio C Hamano
2007-12-02 7:03 ` [PATCH 3/3] git-shell: accept "git foo" form Junio C Hamano
2007-12-02 12:24 ` [PATCH 2/3] Avoid double exec() in execv_git_cmd() Johannes Schindelin
2007-12-02 8:48 ` Christian Couder [this message]
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=200712020948.47084.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).