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

Re: [PATCH v3] To make GIT-VERSION-FILE, search for git more widely

From
MAMatthias Andree <matthias.andree@gmx.de>
Date
May 13, 2009, 12:17 UTC
Message-ID
<op.utva2vxh1e62zd@balu>
In-Reply-To
<7vskje6wsy.fsf@alter.siamese.dyndns.org>
Am 09.05.2009, 18:55 Uhr, schrieb Junio C Hamano <gitster@pobox.com>:
Show 9 quoted lines
> "Matthias Andree" <matthias.andree@gmx.de> writes:
>
>>> Fine then.  Or you could just append "." to the $PATH ;-)
>>
>> "." in the super user's PATH? Cool stuff, and so innovative.
>
> I didn't mean to suggest PATH=$PATH:. *in the user's environment* ;-).
> You do that inside GIT-VERSION-FILE, which is essentially the same thing
> as running ./git$X from there.

No, it is not -- the scope of the GIT variable is much narrower than doing PATH=$PATH:. in the script.

BTW, in the earlier version, I used type(1) to take $PATH search into account in case GIT=git; test -x does not do path search, unlike type.

> What's innovative is whoever is running build as root.

Yes, and that is why I found the PATH-dependent behaviour so irritating and wanted to fix it. I have another approach cooking that entails factoring out common code from ./git-gui/GIT-VERSION-GEN and ./GIT-VERSION-GEN into ./git-gui/GIT-VERSION-SUBR.

For any approach taken, we'll have to touch both the shell and the Makefile, unless we want to manually redo things in the GIT-VERSION-GEN script that were already done automatically or programmatically in Makefile.

Please let me know if you're willing to accept a patch that touches both Makefile and the GIT-VERSION-* shell scripts. If you don't, I can quit here and not waste further time on submissions that are inacceptable anyhow, but just keep rebasing my local patch instead.

Best regards
-- 
Matthias Andree
Previous: Matthias AndreeNext: Junio C Hamano
Message 13 of 22 in “To make GIT-VERSION-FILE, search for git more widely”
  1. To make GIT-VERSION-FILE, search for git more widelyMatthias Andree, May 7, 2009
  2. Michael J GruberMay 7, 2009
  3. Matthias AndreeMay 7, 2009
  4. Michael J GruberMay 7, 2009
  5. Matthias AndreeMay 7, 2009
  6. Junio C HamanoMay 8, 2009
  7. Matthias AndreeMay 8, 2009
  8. Junio C HamanoMay 8, 2009
  9. Matthias AndreeMay 8, 2009
  10. Junio C HamanoMay 9, 2009
  11. Francis GaliegueMay 9, 2009
  12. Matthias AndreeMay 9, 2009
  13. Matthias AndreeMay 13, 2009
  14. Junio C HamanoMay 13, 2009
  15. Nanako ShiraishiJun 2, 2009
  16. Junio C HamanoJun 2, 2009
  17. Johannes SixtJun 2, 2009
  18. Matthias AndreeJun 3, 2009
  19. To make GIT-VERSION-FILE, search for git more widelyMatthias Andree, Jun 4, 2009
  20. Junio C HamanoJun 4, 2009
  21. Matthias AndreeJun 4, 2009
  22. Johannes SixtMay 8, 2009

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.