Change in osmo-dev[master]: gits: fix MODS marks by timestamp-only changes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Mon Nov 19 12:51:25 UTC 2018


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 <osmith at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181119/8d13eef6/attachment.htm>


More information about the gerrit-log mailing list