PATH modifications for git-hook processes

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

 



Using git 2.3.5 (on darwin, installed via homebrew), when executing a
script via the commit-msg githook, the following gets *prepended* to
the $PATH for the subprocess:

  /usr/local/Cellar/git/2.3.5/libexec/git-core:/usr/local/Cellar/git/2.3.5/libexec/git-core:/usr/local/bin:{rest
of path...}

I can't find any documentation about this path modification behavior
in the git docs, and I'm not familiar enough with the source code to
locate it there either.

In our case, the prepending of /usr/local/bin is particularly
problematic, as it effectively reorders our chosen PATH hierarchy (in
which user-space versions of commands are picked up prior to system
installed ones).

(It's also curious that the git-core directory gets prepended twice,
but that doesn't cause us any particular issues.)

My questions:
 - what is the expected PATH modification behavior for subprocesses of
git-hooks? Is this documented anywhere?
 - what would be causing /usr/local/bin to be prepended here, and can
it be adjusted via preference?

Thanks!
--
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]