Subject: Re: [PATCH 2/2] Remember and use GIT_EXEC_PATH on exec()'s

From: Andreas Ericsson <[email-masked]>
Date: Wed, 11 Jan 2006 01:10:26 +0100

Johannes Schindelin wrote:
>>>>>git programs exec other git programs, but they also exec non-git
>>>>>programs.  I think it is not appropriate to change PATH (via
>>>>>prepend_to_path) because this may result in unexpected behavior when
>>>>>exec'ing non-git programs:
>>>>
>>>>This is a valid concern.
>>>
>>>Why? If what is prepended to PATH only contains git programs?
>>>
>>
>>
>>If git is installed with prefix=/usr, then that won't be the case.
> 
> 
> Okay, so here we have the problem: Two completely different setups. One 
> into a standard location on the PATH (which used to be the default), the 
> other with a libexec/ directory (which some want in the future). And a git 
> wrapper which makes no difference between both.
> 
> Wouldn't it make much more sense to have a switch in the Makefile, which 
> says *if* we have a libexec/ directory?

No, it wouldn't, because then we can't use a different release of the 
git-tools without re-compiling the potty.

void prepend_to_path(old_path, to_prep)
{
	if (strstr(old_path, to_prep))
		return;

	really_prepend_to_path(old_path, to_prep);
}

would work just fine though.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231