app: Handle merge commits for git-version.h

Use

  git show-ref --hash refs/heads/master

instead of

  git log HEAD^..HEAD --pretty=format:%H

so we can handle multi-parent (merge) commits.
This commit is contained in:
Martin Nordholts 2010-07-06 16:02:53 +02:00
parent 9ddbc55a08
commit 01113ffeee
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ gimp-console.rc.o: gimp.rc
# 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 HEAD^..HEAD --pretty=format:%H`\"" > "$@.tmp"; \
echo "#define GIMP_GIT_VERSION \"`git show-ref --hash refs/heads/master`\"" > "$@.tmp"; \
elif test ! -f "$@"; then \
echo "#define GIMP_GIT_VERSION \"Unknown, shouldn't happen\"" > "$@.tmp"; \
fi