{"thread":{"id":"21075","subject":"[PATCH] gitk: Refresh the index","startedAt":"2009-09-27T23:43:11Z","lastAt":"2009-09-27T23:43:11Z","messageCount":1,"participants":["Christian Jaeger"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"123910","messageId":"b53c9c0e96f4967935f6c36cd4b2655d22de7cef.1254093602.git.chrjae@gmail.com","threadId":"21075","inReplyTo":null,"subject":"[PATCH] gitk: Refresh the index","fromName":"Christian Jaeger","fromEmail":"chrjae@gmail.com","sentAt":"2009-09-27T23:43:11Z","receivedAt":"2009-09-27T23:43:11Z","isPatch":true,"sender":{"key":"chrjae@gmail.com","avatar":null},"body":"If one or more tracked files changed non-tracked metadata like mtime,\ngitk would report it as \"Local uncommitted changes, not checked in to\nindex\" even if no actual changes have been made. (Clicking on the\n\"Local uncommitted changes..\" entry would show the file but without\nany diff.)\n\nThis refreshes the index in readdiffindex to avoid this and make gitk\nbehave more like \"git status\" instead.\n\nSigned-off-by: Christian Jaeger <chrjae@gmail.com>\n---\n gitk |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n * NOTE: I'm not subscribed to the mailing list. *\n\ndiff --git a/gitk b/gitk\nindex a0214b7..bb0e8e1 100755\n--- a/gitk\n+++ b/gitk\n@@ -4898,6 +4898,7 @@ proc readdiffindex {fd serial inst} {\n     }\n \n     # now see if there are any local changes not checked in to the index\n+    exec git update-index -q --refresh\n     set cmd \"|git diff-files\"\n     if {$vfilelimit($curview) ne {}} {\n \tset cmd [concat $cmd -- $vfilelimit($curview)]\n-- \n1.6.4.4\n"}]}