Abbreviate to 7 characters when building out of git

Otherwise, release tarballs look weird with strings varying in length.

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2018-11-27 15:39:53 -08:00
parent 15d1724bd1
commit ca7edf2fa3

View File

@ -155,8 +155,8 @@ then
# directory, and "git describe" output looks sensible, use that to
# derive a version string.
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
&& v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& v=`git describe --abbrev=7 --match="$prefix*" HEAD 2>/dev/null \
|| git describe --abbrev=7 HEAD 2>/dev/null` \
&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
&& case $v in
$prefix[0-9]*) ;;