[gimp] app: Use `git describe` for verbose version



commit 1801fc70abcd323b5e920807c2c56ba7456b57a1
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Sep 2 19:22:35 2010 +0200

    app: Use `git describe` for verbose version
    
    Use `git describe` for verbose version, it provides more info than
    just the commit ID, and it feels sane to use an existing command for
    this. Note that the commit ID is prefixed with 'g'.

 app/Makefile.am |    2 +-
 app/version.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 8af86cb..1f7e897 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -268,7 +268,7 @@ dist-hook: dist-check-gimp-console dist-dump-gimprc
 # in which case the git-version.h we ship is correct.
 git-version.h: update-git-version-header
 	@if test -d "$(top_srcdir)/.git"; then \
-	  echo "#define GIMP_GIT_VERSION \"`git log -n1 --reverse --pretty=%H`\"" > "$  tmp"; \
+	  echo "#define GIMP_GIT_VERSION \"`git describe`\"" > "$  tmp"; \
 	elif test ! -f "$@"; then \
 	  echo "#define GIMP_GIT_VERSION \"Unknown, shouldn't happen\"" > "$  tmp"; \
 	fi
diff --git a/app/version.c b/app/version.c
index f286d3d..c1e7b62 100644
--- a/app/version.c
+++ b/app/version.c
@@ -129,7 +129,7 @@ gimp_version_show (gboolean be_verbose)
 
   if (be_verbose)
     {
-      g_print ("git commit %s", GIMP_GIT_VERSION);
+      g_print ("git-describe: %s", GIMP_GIT_VERSION);
       g_print ("\n");
 
       g_print ("\n");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]