[buildd-tools-devel] [PATCH] scripts/git-version: Ask git for date differently

Geoffrey Thomas geofft at MIT.EDU
Sat Nov 21 01:32:02 UTC 2009


From: Geoffrey Thomas <geofft at mit.edu>

--date=iso appears to be broken in lenny's git (1.5.6.5). This code is
simpler anyway.

Signed-off-by: Geoffrey Thomas <geofft at mit.edu>
---
 scripts/git-version |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/git-version b/scripts/git-version
index 9e772b6..1d6e83f 100755
--- a/scripts/git-version
+++ b/scripts/git-version
@@ -7,7 +7,7 @@ TAG="release/${PACKAGE}-${VERSION}"
 COMMIT="$(git rev-parse "$TAG^{}")" 2>/dev/null || COMMIT=""
 
 if [ -n "$COMMIT" ]; then
-    COMMIT_DATE="$(git log -1 --date=iso "$COMMIT" --pretty="format:%ad")"
+    COMMIT_DATE="$(git log -1 "$COMMIT" --pretty="format:%ai")"
 
     RELEASE_DATE="$(date --date="$COMMIT_DATE" '+%d %b %Y')"
     RELEASE_BY="$(git show "$TAG" | sed -ne '/^Tagger:/{s/Tagger:[[:space:]][[:space:]]*//p;q}')"
-- 
1.6.3.3




More information about the Buildd-tools-devel mailing list