DORMANTno replies

[PATCH] gitk: Refresh the index

From: Christian Jaeger <hidden>
Date: 2016-06-15 22:47:27
Subsystem: the rest · Maintainer: Linus Torvalds

If one or more tracked files changed non-tracked metadata like mtime,
gitk would report it as "Local uncommitted changes, not checked in to
index" even if no actual changes have been made. (Clicking on the
"Local uncommitted changes.." entry would show the file but without
any diff.)

This refreshes the index in readdiffindex to avoid this and make gitk
behave more like "git status" instead.

Signed-off-by: Christian Jaeger <redacted>
---
 gitk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

 * NOTE: I'm not subscribed to the mailing list. *
diff --git a/gitk b/gitk
index a0214b7..bb0e8e1 100755
--- a/gitk
+++ b/gitk
@@ -4898,6 +4898,7 @@ proc readdiffindex {fd serial inst} {
     }
 
     # now see if there are any local changes not checked in to the index
+    exec git update-index -q --refresh
     set cmd "|git diff-files"
     if {$vfilelimit($curview) ne {}} {
 	set cmd [concat $cmd -- $vfilelimit($curview)]
-- 
1.6.4.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help