osmith has submitted this change and it was merged. (
https://gerrit.osmocom.org/11807 )
Change subject: gits: fix MODS marks by timestamp-only changes
......................................................................
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
---
M src/gits
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Neels Hofmeyr: Looks good to me, approved
osmith: Verified
diff --git a/src/gits b/src/gits
index 8b75278..bd53cb5 100755
--- a/src/gits
+++ b/src/gits
@@ -99,7 +99,7 @@
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'):
--
To view, visit https://gerrit.osmocom.org/11807
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6726190912a1b3eb865cda77fbea6bf58a635d6e
Gerrit-Change-Number: 11807
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>