Fix up tools/version.sh for git transition.

Since we will be transitioning to git, stop considering svn the primary source.
If HEAD is a git-svn revision, return the svn revision number as before
(this means that if you check out old versions they keep their previously
canonical version numbers) but if it's not, then just print the short SHA1.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31480 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Torne Wuff 2011-12-31 16:32:21 +00:00
parent 79f88e7f39
commit 3a9aa8e51b

View file

@ -44,7 +44,7 @@ gitversion() {
mod="" mod=""
# Is this a git-svn commit? # Is this a git-svn commit?
if ! git log -1 --pretty=format:"%b" | grep -q "git-svn-id: svn" ; then if ! git log -1 --pretty=format:"%b" | grep -q "git-svn-id: svn" ; then
version="$version+$head" version="$head"
fi fi
# Are there uncommitted changes? # Are there uncommitted changes?
export GIT_WORK_TREE="$1" export GIT_WORK_TREE="$1"