Re: [PATCH] Windows: set gitexecdir = $(bindir)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jul 19, 2008, at 10:52 AM, Johannes Sixt wrote:

On Samstag, 19. Juli 2008, Junio C Hamano wrote:
Sorry, I am not sure if I understand what you are trying to solve. If you have ../libexec/git-core/ in GIT_EXEC_PATH (or have builtin_exec_path()
use it), then your installation would look like this:

	[[some random place]]
       	bin/git
               libexec/git-core/git-add
               libexec/git-core/git-del
               libexec/git-core/git-dir
               ...

and if "git" can figure out it is "[[some random place]]/bin/git",
it can find its subcommands from neighbouring directory, that is still
inside the random place the user told the installer to use, can't it?

Yes, but...

Take as an example 'git pull'.

- The first call to git will derive the exec-path
$prefix/bin/../libexec/git-core and prepend it to $PATH.

- Calls to builtin git commands from inside 'git pull' will then derive the
exec-path $prefix/bin/../libexec/git-core/../libexec/git-core, that is
$prefix/libexec/libexec/git-core, and prepend it to $PATH as well. That directory does not exist - usually - and it does not hurt. But it feels dirty
and potentially dangerous.

Maybe we can avoid this based on the name of the executable?
We would add libexec only if the executable is named "git",
but not if it is one of the dashed forms "git-*".

	Steffen
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux