# Check for git and a git repo.
if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
- # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore it,
- # because this version is defined in the top level Makefile.
- if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
-
- # If we are past a tagged commit (like "v2.6.30-rc5-302-g72357d5"),
- # we pretty print it.
- if atag="`git describe 2>/dev/null`"; then
- echo "$atag" | awk -F- '{printf(".%s", $(NF))}'
-
- # If we don't have a tag at all we print -g{commitish}.
- else
- printf '%s' $head
- fi
+ # If we are past a tagged commit (like "v2.6.30-rc5-302-g72357d5"),
+ # we pretty print it.
+ if atag="`git describe 2>/dev/null`"; then
+ echo "$atag" | awk -F- '{printf("%s", $(NF))}'
+
+ # If we don't have a tag at all we print {commitish}.
+ else
+ printf '%s' $head
fi
# Is this git on svn?