Attempt to make version.sh a little more resistant to producing spurious "modified" status on git repositories.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20933 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andrew Mahone 2009-05-15 00:57:35 +00:00
parent 216424a27f
commit 1de930227b

View file

@ -45,11 +45,10 @@ gitversion() {
# Is this a git-svn commit?
if ! git log HEAD^.. --pretty=format:"%b" | grep -q "git-svn-id: svn" ; then
mod="M"
fi
# Are there uncommitted changes?
git update-index --refresh --unmerged > /dev/null
if git diff-index --name-only HEAD | read dummy; then
elif git diff --name-only HEAD | read dummy; then
mod="M"
elif git diff --name-only --cached HEAD | read dummy; then
mod="M"
fi