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:
parent
216424a27f
commit
1de930227b
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue