git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Kaarsemaker <dennis@kaarsemaker.net>
To: git@vger.kernel.org
Subject: [PATCH] GIT-VERSION-GEN: support non-standard $GIT_DIR path
Date: Sun, 16 Jun 2013 01:01:11 +0200	[thread overview]
Message-ID: <20130615230108.GA21005@kaarsemaker.net> (raw)

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

             reply	other threads:[~2013-06-15 23:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15 23:01 Dennis Kaarsemaker [this message]
2013-06-17 20:06 ` [PATCH] GIT-VERSION-GEN: support non-standard $GIT_DIR path Junio C Hamano
2013-06-17 20:09   ` Junio C Hamano
2013-06-18  7:20     ` Dennis Kaarsemaker
2013-06-18 14:36       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130615230108.GA21005@kaarsemaker.net \
    --to=dennis@kaarsemaker.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).