Subject: git's directory is _prepended_ to PATH when called with an absolute path

From: David Rodríguez <[email-masked]>
Date: Tue, 21 Apr 2015 18:37:29 -0300

For example, if I run git using:

$ /usr/bin/git

then /usr/bin is prepended to the path. Is this intentional? If it is, why?

This causes issues with Ruby git hooks, because Ruby version managers 
rely on custom settings in PATH to select the Ruby executable, and 
there's usually a system Ruby living in /usr/bin. See 
https://github.com/github/hub/issues/855 for an example.

Thanks a lot,

David Rodríguez.