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

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

From
Johannes Sixt <j.sixt@viscovery.net>
Date
May 7, 2009, 08:35 UTC
Message-ID
<4A029D43.4030604@viscovery.net>
In-Reply-To
<1241684666-18956-1-git-send-email-matthias.andree@gmx.de>
(sorry for the previous message; fingers were too fast)
Matthias Andree schrieb:
> +	VN=$(${GIT} describe --abbrev=4 HEAD 2>/dev/null) &&
> +		${GIT} update-index -q --refresh
> +		test -z "$(${GIT} diff-index --name-only HEAD --)" ||
Use "$GIT" in all those cases
>  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
> -	@$(SHELL_PATH) ./GIT-VERSION-GEN
> +	@{ GIT=./git$X ; type $$GIT >/dev/null 2>&1 ; } \
+	@{ GIT=./git$X ; type "$$GIT" >/dev/null 2>&1 ; } \
> +	    || { GIT=$(prefix)/bin/git$X ; type $$GIT >/dev/null 2>&1 ; }\
+	    || { GIT='$(prefix_SQ)/bin/git$X' ; type "$$GIT" >/dev/null 2>&1 ; }\
BTW, isn't `test -x "$GIT"` better in some way than `type "$GIT"`?
> +	    || GIT=git ; \
> +	    export GIT ; \
> +	    $(SHELL_PATH) ./GIT-VERSION-GEN
-- Hannes
Previous: Matthias AndreeNext: Matthias Andree
Message 12 of 13 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. Johannes SixtMay 7, 2009
  3. Junio C HamanoMay 7, 2009
  4. Matthias AndreeMay 7, 2009
  5. Re: To make GIT-VERSION-FILE, search for git more widelyNicolas Sebrecht, May 7, 2009
  6. Matthias AndreeMay 7, 2009
  7. Re: To make GIT-VERSION-FILE, search for git more widelyNicolas Sebrecht, May 7, 2009
  8. Johannes SixtMay 7, 2009
  9. Michael J GruberMay 7, 2009
  10. Matthias AndreeMay 7, 2009
  11. Matthias AndreeMay 7, 2009
  12. Johannes SixtMay 7, 2009
  13. To make GIT-VERSION-FILE, search for git more widelyMatthias Andree, May 7, 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.