From: Andreas Ericsson Date: Wed, 11 Jan 2006 00:10:26 GMT Subject: Re: [PATCH 2/2] Remember and use GIT_EXEC_PATH on exec()'s Message-ID: <43C44CF2.5050808@op5.se> In-Reply-To: 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 andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231