Thread (12 messages) flat view 12 messages, 5 authors, 2016-06-15

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

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:42:16

Possibly related (same subject, not in this thread)

Johannes Schindelin wrote:
quoted
quoted
quoted
quoted
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                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help