git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: PATH modifications for git-hook processes

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 22, 2015, 17:46 UTC
Message-ID
<xmqq1tjcf432.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150416061732.GA5612@peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
>   IOW, you can do things like
>
>         alias git=/opt/my-git/git
>
>   and all the "git" commands will automatically work fine, even if you
>   didn't know at compile time where you would install them, and you didn't
>   set GIT_EXEC_DIR at run-time. It will still first look in GIT_EXEC_DIR,
>   but if that fails, it will take the git commands from /opt/my-git/ instead
>   of from /usr/bin or whatever.
>
> If we can get away with just dropping this element from the PATH, I'd
> much rather do that than try to implement a complicated path-precedence
> scheme.

I am OK with dropping it at a major version boundary with deprecation notice in the release note. Unlike older days, by now, Git has become so essential to users' everyday life, and there is not much reason for people to keep the installation of Git they built outside their $PATH, and "alias git=/opt/git/bin/git" has lost much of its value, I would think.

Previous: David RodríguezNext: Jeff King
Message 7 of 12 in “PATH modifications for git-hook processes”
  1. Matthew RothenbergApr 14, 2015
  2. Junio C HamanoApr 14, 2015
  3. Matthew RothenbergApr 15, 2015
  4. Jeff KingApr 16, 2015
  5. Jeff KingApr 16, 2015
  6. David RodríguezApr 22, 2015
  7. Junio C HamanoApr 22, 2015
  8. stop putting argv[0] dirname at front of PATHJeff King, Apr 22, 2015
  9. Eric SunshineApr 22, 2015
  10. Jeff KingApr 22, 2015
  11. Jonathan NiederApr 22, 2015
  12. Jeff KingApr 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.