{"thread":{"id":"23234","subject":"[PATCH/RFC resend] gitk: Ignore limitdiffs option when displaying commit file list","startedAt":"2010-03-29T14:29:06Z","lastAt":"2010-03-29T14:29:06Z","messageCount":1,"participants":["Tim Henigan"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"138092","messageId":"32c343771003290729x49407af7hf404b60203d123ac@mail.gmail.com","threadId":"23234","inReplyTo":null,"subject":"[PATCH/RFC resend] gitk: Ignore limitdiffs option when displaying commit file list","fromName":"Tim Henigan","fromEmail":"tim.henigan@gmail.com","sentAt":"2010-03-29T14:29:06Z","receivedAt":"2010-03-29T14:29:06Z","isPatch":true,"sender":{"key":"tim.henigan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42022?v=4"},"body":"When gitk is invoked with a path argument (e.g. gitk gitk-git),\nthe path is used to filter the list of files displayed in the\nlower right window.  If a file does not start with the specified\nsubstring, it is not displayed.  This is counter-intuitive for\na couple reasons:\n 1) The files continue to be listed in the diff window.\n 2) Merge commits (i.e. commits with more than 1 parent) still\n    show the complete list of files in the lower right since\n    these commits are processed by 'mergediff' rather than\n    the 'startdiff' function.\n\nWith this change, the complete list of files affected by a\ncommit will always be shown in the lower right window.\n\nSigned-off-by: Tim Henigan <tim.henigan@gmail.com>\n---\n\nThis is a resend with Paul Mackerras added to the CC list.\n\nI noticed this issue recently when trying gitk.  After some research, I found\nthis thread [1] which explained the issue.  However, the operation still does\nnot seem consistent.  This patch fixes the \"problem\" that I encountered, but\nI can't help wondering:\n   1) I am breaking another feature?  Especially since the\n        '$vfilelimit($curview) ne {}' check is now ignored.\n   2) Can the limitdiffs option be completely removed?  If not, the behavior\n       of startdiff and mergediff should at least be made consistent.\n\nI copied the people that were involved in the earlier thread [1].\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/133088\n\n gitk-git/gitk |   12 +-----------\n 1 files changed, 1 insertions(+), 11 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 1f36a3e..518061e 100644\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -7450,17 +7450,7 @@ proc gettreediffline {gdtf ids} {\n       return [expr {$nr >= $max? 2: 1}]\n    }\n    close $gdtf\n-    if {$limitdiffs && $vfilelimit($curview) ne {}} {\n-       set flist {}\n-       foreach f $treediff {\n-           if {[path_filter $vfilelimit($curview) $f]} {\n-               lappend flist $f\n-           }\n-       }\n-       set treediffs($ids) $flist\n-    } else {\n-       set treediffs($ids) $treediff\n-    }\n+    set treediffs($ids) $treediff\n    unset treepending\n    if {$cmitmode eq \"tree\" && [llength $diffids] == 1} {\n       gettree $diffids\n--\n1.7.0.3.291.g5e4f6.dirty\n"}]}