diff options
-rwxr-xr-x | scripts/setlocalversion | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index bd6dca8a0ab2..e6cdf58d7bd8 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -45,26 +45,9 @@ scm_version() # Check for git and a git repo. if test -d .git && 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 only the short version is requested, don't bother - # running further git commands - if $short; then - 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 + # Regardless whether it is a tagged commit (like "v2.6.30-rc6"), + # we will put the commit info in. + printf '%s%s' -g $head # Is this git on svn? if git config --get svn-remote.svn.url >/dev/null; then |