From: John Ellson <ellson@research.att.com>
To: git@vger.kernel.org
Subject: [PATCH] Make GIT-VERSION-GEN tolerate missing git describe command
Date: Fri, 30 Dec 2005 11:23:17 -0500 [thread overview]
Message-ID: <dp3mtp$rfm$1@sea.gmane.org> (raw)
I think it is probably a bug that "git non_existent_command"
returns its error message to stdout without an error, where
"git-non_existent_command" behaves differently and does return an
error.
Older versions of git did not implement "git describe" and
GIT-VERSION-GEN produces an empty version string if run on
a system with such a git installed. The consequence
is that "make rpm" fails.
This patch fixes GIT-VERSION-GEN so that it works in the
absence of a working "git describe"
----------------------------------------
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 196402c..845b9dc 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -2,7 +2,7 @@
GVF=GIT-VERSION-FILE
-VN=$(git describe --abbrev=4 HEAD 2>/dev/null) || VN=v1.0.GIT
+VN=$(git-describe --abbrev=4 HEAD 2>/dev/null) || VN=v1.0.GIT
VN=$(expr "$VN" : v'\(.*\)')
if test -r $GVF
then
----------------------------------------
Signed-off-by: John Ellson <ellson@research.att.com>
next reply other threads:[~2005-12-30 16:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-30 16:23 John Ellson [this message]
2005-12-30 18:49 ` [PATCH] Make GIT-VERSION-GEN tolerate missing git describe command Linus Torvalds
2005-12-30 19:12 ` John Ellson
2005-12-30 19:55 ` Linus Torvalds
2005-12-30 19:31 ` John Ellson
2005-12-31 0:15 ` H. Peter Anvin
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='dp3mtp$rfm$1@sea.gmane.org' \
--to=ellson@research.att.com \
--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).