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'.
This commit is contained in:
Martin Nordholts 2010-09-02 19:22:35 +02:00
parent fc7831f7a1
commit 1801fc70ab
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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");