summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-05-15 00:57:35 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-05-15 00:57:35 +0000
commit1de930227b625def744d41b9e05abf429fc404c3 (patch)
tree08b34ccd4e1fe02633e38c1d7e1089c99415c94e
parent216424a27ffd8ce5efe93d02ff29d13d3fe92d5d (diff)
downloadrockbox-1de930227b625def744d41b9e05abf429fc404c3.tar.gz
rockbox-1de930227b625def744d41b9e05abf429fc404c3.tar.bz2
rockbox-1de930227b625def744d41b9e05abf429fc404c3.zip
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
-rwxr-xr-xtools/version.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/version.sh b/tools/version.sh
index 9f47afcfd2..332dbc1838 100755
--- a/tools/version.sh
+++ b/tools/version.sh
@@ -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