From 1de930227b625def744d41b9e05abf429fc404c3 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Fri, 15 May 2009 00:57:35 +0000 Subject: [PATCH] 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 --- tools/version.sh | 7 +++---- 1 file 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