summaryrefslogtreecommitdiffstats
path: root/git_version.sh
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
committerDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
commitc8e9eb18d8d13d099a4a177fe53de507c1d9ce8b (patch)
treeab2388afb795ed1a7ead2fbbf8b9d1b368a8231f /git_version.sh
parentdd9a3bcbef65bde65491d959e9458bc641924811 (diff)
parent3863e7999255deeaa7f8f4bba7df893773812537 (diff)
downloadsystemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.gz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.xz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.zip
Merge commit 'origin/master' into pr7043
Conflicts: runtime/print.c runtime/transport/transport.c runtime/transport/transport_msgs.h
Diffstat (limited to 'git_version.sh')
-rwxr-xr-xgit_version.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git_version.sh b/git_version.sh
index d39d96c9..c9d3dff7 100755
--- a/git_version.sh
+++ b/git_version.sh
@@ -180,7 +180,7 @@ fi
# Detect git tools (should work with old and new git versions)
git_found=yes
-for git_tool in git-symbolic-ref git-rev-parse git-diff-files git-diff-index git
+for git_tool in git-symbolic-ref git-rev-parse git-diff-files git-diff-index git git-describe
do
if [ x`which $git_tool 2>/dev/null` = "x" ]; then
git_found="'$git_tool' not found"
@@ -207,7 +207,7 @@ if [ "x$git_repo_dir" != "x" ] && [ "x${abs_repo_dir}" = "x${abs_srcdir}/.git" ]
git_repo=yes
if [ "x$git_found" = "xyes" ]; then
# git-1.4 and probably earlier understand "git-rev-parse HEAD"
- git_shaid=`git-rev-parse HEAD | $SED -n 's/^\(.\{8\}\).*/\1/p'`
+ git_shaid=`git-describe --long 2>/dev/null || git-describe 2>/dev/null || git-rev-parse HEAD`
if [ "x$git_shaid" = "x" ]; then
git_errors="${git_errors+${git_errors}; }error running 'git-rev-parse HEAD'"
fi