gits: fix MODS marks by timestamp-only changes

Use 'git diff' instead of 'git diff-index'. The latter does not look at
the content. It listed a file with an updated timestap as modified
(indicated in gits with "MODS"), whereas 'git diff' and 'git status'
did not (and we want this behavior, not marking it as modified).

This was a regression from b93f50 ("gits: use git plumbing commands").

Change-Id: I6726190912a1b3eb865cda77fbea6bf58a635d6e
This commit is contained in:
Oliver Smith 2018-11-16 16:47:57 +01:00 committed by osmith
parent 1cbec1915b
commit 2a30b520c4
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ def git_branch_current(git_dir):
def git_has_modifications(git_dir):
return not git_bool(git_dir, 'diff-index', '--quiet', 'HEAD')
return not git_bool(git_dir, 'diff', '--quiet', 'HEAD')
def git_can_fast_forward(git_dir, branch='master', remote='origin'):