diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-07-02 12:19:59 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-07-03 07:47:21 +0200 |
commit | e993b7af1c2faf11d0ce005a437fd64e854f2608 (patch) | |
tree | 9326535f98248f18322d07c54d329fc6fff8cfed | |
parent | b8fec7e2f0b22a5c853eccc382669b9fb997153c (diff) | |
download | ptxdist-e993b7af1c2faf11d0ce005a437fd64e854f2608.tar.gz ptxdist-e993b7af1c2faf11d0ce005a437fd64e854f2608.tar.xz |
setlocalversion: use a fixed abbrev length for the version stringptxdist-2014.07.0
Otherwise, this depends on the local settings.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | scripts/kernel/setlocalversion | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion index 0ece32147..8546eefc1 100755 --- a/scripts/kernel/setlocalversion +++ b/scripts/kernel/setlocalversion @@ -46,7 +46,7 @@ fi cd "$(dirname "${tarball_version_file}")" # Check for git and a git repo. -if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then +if head=`git -c core.abbrev=12 rev-parse --verify --short HEAD 2>/dev/null`; then # If we are at a tagged commit (like "ptxdist-2010.05.0"), we # print it here @@ -55,7 +55,7 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then # If we are past a tagged commit (like "ptxdist-2010.03.0-130-g3c60777"), # we pretty print it. - elif atag="`git describe 2>/dev/null`"; then + elif atag="`git -c core.abbrev=12 describe 2>/dev/null`"; then echo "$atag" | awk -F- '{printf("%s-%05d-%s", $(NF-2),$(NF-1),$(NF))}' # If we don't have a tag at all we print ????.??.?-?-g{commitish}. |