Re: [PATCH 5/7] use only the $PATH for exec'ing git commands
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2007, 06:18 UTC
- Message-ID
- <7vlk9nzrrv.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1193474215-6728-5-git-send-email-srp@srparish.net>
Scott R Parish <srp@srparish.net> writes:
Show 11 quoted lines
> diff --git a/exec_cmd.c b/exec_cmd.c
> index 8b681d0..c228dbf 100644
> --- a/exec_cmd.c
> +++ b/exec_cmd.c
> @@ -29,85 +29,68 @@ const char *git_exec_path(void)
> return builtin_exec_path;
> }
>
> +static void add_path(struct strbuf *out, const char *path)
> +{
> + if (path && strlen(path)) {I wonder if s/strlen(path)/*path/ micro-optimization is worth doing. Ideally, if built-in strlen() is used, the compiler should be clever enough to notice it, though...