Fix version_string.sh: dirty suffix on untracked files

Don't use the git describe --dirty option to append the suffix
because it only considers changes in tracked files as dirt.  If
the script wants to consider untracked files as dirt then this
will not do.
This commit is contained in:
Andrew Bettison 2013-09-23 17:34:45 +09:30
parent 08b44e96ed
commit 2e211a62d5

View File

@ -108,8 +108,8 @@ if [ -n "$dirty" ] && ! $allow_modified; then
exit 3
fi
# Use the "git describe" command to form the version string.
if error="$(git describe --match="$version_tag_glob" "${dirty:+--dirty=$dirty}" 2>&1 1>&5)" 5>&1; then
# Use the "git describe" command to form the version string and append $dirty.
if error="$( (desc="$(git describe --match="$version_tag_glob")" && echo "$desc$dirty") 2>&1 1>&5)" 5>&1; then
exit 0
fi