git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make GIT-VERSION-GEN tolerate missing git describe command
@ 2005-12-30 16:23 John Ellson
  2005-12-30 18:49 ` Linus Torvalds
  2005-12-30 19:31 ` John Ellson
  0 siblings, 2 replies; 6+ messages in thread
From: John Ellson @ 2005-12-30 16:23 UTC (permalink / raw)
  To: git

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>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-31  0:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-30 16:23 [PATCH] Make GIT-VERSION-GEN tolerate missing git describe command John Ellson
2005-12-30 18:49 ` 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

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).