From: Junio C Hamano <gitster@pobox.com>
To: mkoegler@auto.tuwien.ac.at (Martin Koegler)
Cc: git@vger.kernel.org
Subject: Re: new GIT-VERSION-GEN with old GIT
Date: Sat, 23 Feb 2008 10:46:31 -0800 [thread overview]
Message-ID: <7vtzjz33zs.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080223173401.GA7808@auto.tuwien.ac.at> (Martin Koegler's message of "Sat, 23 Feb 2008 18:34:01 +0100")
mkoegler@auto.tuwien.ac.at (Martin Koegler) writes:
> On Debian, git 1.4.4 is still shipped in the stable distribution.
>
> Since e5fc9a0aea2c3c49829b5cdf499339e5c759706b, simply running make in
> a git checkout yields to an error message.
>
> The error is in GIT-VERSION-GEN:
> | + git diff-index --quiet HEAD
> ...
Sorry about that. I already have forgotten that --quiet was a
relatively recent invention.
Before e5fc9a, we used --name-only, which was around forever.
The original diff-cache had it since mid July 2005, and the
command kept the option when it was renamed to diff-index in
early September 2005. That is what we should use.
GIT-VERSION-GEN | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 03fb9d7..d4714ee 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -16,7 +16,8 @@ elif test -d .git &&
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*)
- git diff-index --quiet HEAD || VN="$VN-dirty" ;;
+ test -z "$(git diff-index --name-only HEAD)" ||
+ VN="$VN-dirty" ;;
esac
then
VN=$(echo "$VN" | sed -e 's/-/./g');
prev parent reply other threads:[~2008-02-23 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 17:34 new GIT-VERSION-GEN with old GIT Martin Koegler
2008-02-23 18:46 ` Junio C Hamano [this message]
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=7vtzjz33zs.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mkoegler@auto.tuwien.ac.at \
/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).