From: Alexander Gavrilov Date: Wed, 08 Oct 2008 07:05:37 GMT Subject: [PATCH 4/7] gitk: Fix file list context menu for merge commits. Message-ID: <1223449540-20457-5-git-send-email-angavrilov@gmail.com> In-Reply-To: <1223449540-20457-4-git-send-email-angavrilov@gmail.com> Currently it displays an ugly error box, because the treediffs array is not filled for such commits. This is clearly unacceptable. Signed-off-by: Alexander Gavrilov --- gitk | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gitk b/gitk index 3c77909..cfaf7a1 100755 --- a/gitk +++ b/gitk @@ -6479,7 +6479,7 @@ proc getblobline {bf id} { proc mergediff {id} { global diffmergeid mdifffd - global diffids + global diffids treediffs global parents global diffcontext global diffencoding @@ -6487,6 +6487,7 @@ proc mergediff {id} { set diffmergeid $id set diffids $id + set treediffs($id) [list ] # this doesn't seem to actually affect anything... set cmd [concat | git diff-tree --no-commit-id --cc -U$diffcontext $id] if {$limitdiffs && $vfilelimit($curview) ne {}} { @@ -6506,7 +6507,7 @@ proc mergediff {id} { proc getmergediffline {mdf id np} { global diffmergeid ctext cflist mergemax - global difffilestart mdifffd + global difffilestart mdifffd treediffs global ctext_file_names ctext_file_lines global diffencoding @@ -6524,6 +6525,7 @@ proc getmergediffline {mdf id np} { $ctext insert end "\n" set here [$ctext index "end - 1c"] lappend difffilestart $here + lappend treediffs($id) $fname add_flist [list $fname] lappend ctext_file_names $fname lappend ctext_file_lines [lindex [split $here "."] 0] -- 1.6.0.20.g6148bc