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

[PATCH] GIT-VERSION-GEN: support non-standard $GIT_DIR path

From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
Date
Jun 15, 2013, 23:01 UTC
Message-ID
<20130615230108.GA21005@kaarsemaker.net>

make and make test both work when $GIT_DIR isn't .git, but make dist included a bogus GIT-VERSION-FILE.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
---
 I'm doing daily builds of git, using many workers and a shared git.git,
 with per-worker checkouts, it would be really useful if GIT-VERSION-GEN
 actually supports this and doesn't generate a fairly bogus
 GIT-VERSION-FILE.
 GIT-VERSION-GEN | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 390782f..7dcca28 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -11,7 +11,7 @@ LF='
 if test -f version
 then
 	VN=$(cat version) || VN="$DEF_VER"
-elif test -d .git -o -f .git &&
+elif test -d .git -o -f .git -o test -d $GIT_DIR &&
 	VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
 	case "$VN" in
 	*$LF*) (exit 1) ;;
-- 
1.8.2.4.g940421e
Next: Junio C Hamano
Message 1 of 5 in “GIT-VERSION-GEN: support non-standard $GIT_DIR path”
  1. GIT-VERSION-GEN: support non-standard $GIT_DIR pathDennis Kaarsemaker, Jun 15, 2013
  2. Junio C HamanoJun 17, 2013
  3. Junio C HamanoJun 17, 2013
  4. Dennis KaarsemakerJun 18, 2013
  5. Junio C HamanoJun 18, 2013

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.