Merge "setlocalversion: Include post Linus git tags in LOCALVERSION_AUTO" into msm-3.0

This commit is contained in:
Linux Build Service Account
2012-03-07 23:37:05 -08:00
committed by QuIC Gerrit Code Review

View File

@@ -55,16 +55,17 @@ scm_version()
echo "+"
return
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("-%05d-%s", $(NF-1),$(NF))}'
# If we don't have a tag at all we print -g{commitish}.
else
printf '%s%s' -g $head
fi
fi
# If we are past a tagged commit (like
# "v2.6.30-rc5-302-g72357d5"), we pretty print it but strip
# off the v2.6.30-rc5 part because that's in the Makefile.
if atag="`git describe 2>/dev/null`"; then
atag="-${atag/v$KERNELVERSION-/}"
# If we don't have a tag at all we print -g{commitish}.
else
atag="-g$head"
fi
printf '%s' "$atag"
# Is this git on svn?
if git config --get svn-remote.svn.url >/dev/null; then