git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
To: git@vger.kernel.org
Cc: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Subject: [PATCH] Make GIT-VERSION-GEN tolerate missing git describe command again
Date: Thu, 26 Jan 2006 17:39:27 +0100	[thread overview]
Message-ID: <1138293567831-git-send-email-Uwe_Zeisberger@digi.com> (raw)
In-Reply-To: <20060126134521.GA11570@informatik.uni-freiburg.de>

Commit 5c7d3c95 broke that by making the git-describe command part of
a pipe.

Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>

---

 GIT-VERSION-GEN |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

b5763601050151e944cb58b3b0fe6f4aee88b47f
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index e3cd9fa..72201be 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -5,9 +5,11 @@ DEF_VER=v1.1.GIT
 
 # First try git-describe, then see if there is a version file
 # (included in release tarballs), then default
-VN=$(git-describe --abbrev=4 HEAD 2>/dev/null | sed -e 's/-/./g') ||
-VN=$(cat version) ||
-VN="$DEF_VER"
+if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then
+	VN=$(echo "$VN" | sed -e 's/-/./g');
+else
+	VN=$(cat version) || VN="$DEF_VER"
+fi
 
 VN=$(expr "$VN" : v*'\(.*\)')
 
-- 
1.1.4-g9acfd

      reply	other threads:[~2006-01-26 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26 13:45 5c7d3c95 broke 026351a Uwe Zeisberger
2006-01-26 16:39 ` Uwe Zeisberger [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=1138293567831-git-send-email-Uwe_Zeisberger@digi.com \
    --to=uwe_zeisberger@digi.com \
    --cc=git@vger.kernel.org \
    --cc=zeisberg@informatik.uni-freiburg.de \
    /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).