git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitk: Refresh the index
@ 2009-09-27 23:43 Christian Jaeger
  0 siblings, 0 replies; only message in thread
From: Christian Jaeger @ 2009-09-27 23:43 UTC (permalink / raw)
  To: git; +Cc: Christian Jaeger

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 <chrjae@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-27 23:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-27 23:43 [PATCH] gitk: Refresh the index Christian Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).