aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2008-10-08 11:05:37 +0400
committerPaul Mackerras <paulus@samba.org>2008-10-21 22:37:39 +1100
commit2df6442f7dc0d6cd5636e6ac413d06f92eb04029 (patch)
tree7f467ce761b05472112bc0142f9e2c1f3fb0e9f1
parentbee866fa6b5a77f65d9915f8778919ef76d9d6c1 (diff)
downloadgit-2df6442f7dc0d6cd5636e6ac413d06f92eb04029.tar.gz
git-2df6442f7dc0d6cd5636e6ac413d06f92eb04029.tar.xz
gitk: Fix file list context menu for merge commits
Currently it displays an ugly error box, because the treediffs array is not filled for such commits. This fixes it by making getmergediffline add the filenames it sees to the treediffs array like gettreediffline does. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rwxr-xr-xgitk6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitk b/gitk
index 5830941b7..f6a3e10d8 100755
--- a/gitk
+++ b/gitk
@@ -6418,7 +6418,7 @@ proc getblobline {bf id} {
proc mergediff {id} {
global diffmergeid mdifffd
- global diffids
+ global diffids treediffs
global parents
global diffcontext
global diffencoding
@@ -6426,6 +6426,7 @@ proc mergediff {id} {
set diffmergeid $id
set diffids $id
+ set treediffs($id) {}
# 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 {}} {
@@ -6445,7 +6446,7 @@ proc mergediff {id} {
proc getmergediffline {mdf id np} {
global diffmergeid ctext cflist mergemax
- global difffilestart mdifffd
+ global difffilestart mdifffd treediffs
global diffencoding
$ctext conf -state normal
@@ -6462,6 +6463,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]
set diffencoding [get_path_encoding $fname]
set l [expr {(78 - [string length $fname]) / 2}]