Skip to content

Commit

Permalink
git-version-gen: Avoid further processing when tarball-version is pre…
Browse files Browse the repository at this point in the history
…sent

In case a tarball-version file is present, use that and quit.

Otherwise git will continue looking for directories, potentially
finding .git directories which are dirty and mark the version as such.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90936
  • Loading branch information
rossburton authored and David Henningsson committed Oct 20, 2015
1 parent f277f2c commit c25b065
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-version-gen
Expand Up @@ -84,7 +84,10 @@ then
v=`cat $tarball_version_file` || exit 1
case $v in
*$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
[0-9]*)
echo "$v" | tr -d '\012'
exit 0
;;
*) v= ;;
esac
test -z "$v" \
Expand Down

0 comments on commit c25b065

Please sign in to comment.