Skip to content

Commit 1115fb3

Browse files
author
Paul Mackerras
committed
Fix some bugs causing application error popups.
Specifically this should fix the following errors: wrong # args: should be "startdiff ids" (fix from Junio Hamano) can't read "filelines(....)": no such element in array can't unset "treepending": no such variable
1 parent c8a4acb commit 1115fb3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

gitk

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,9 @@ proc mergediff {id} {
17291729
set diffpindex -1
17301730
set diffmergegca [findgca $parents($id)]
17311731
if {[info exists mergefilelist($id)]} {
1732-
showmergediff
1732+
if {$mergefilelist($id) ne {}} {
1733+
showmergediff
1734+
}
17331735
} else {
17341736
contmergediff {}
17351737
}
@@ -1753,7 +1755,7 @@ proc findgca {ids} {
17531755

17541756
proc contmergediff {ids} {
17551757
global diffmergeid diffpindex parents nparents diffmergegca
1756-
global treediffs mergefilelist diffids
1758+
global treediffs mergefilelist diffids treepending
17571759

17581760
# diff the child against each of the parents, and diff
17591761
# each of the parents against the GCA.
@@ -1814,8 +1816,8 @@ proc contmergediff {ids} {
18141816

18151817
proc showmergediff {} {
18161818
global cflist diffmergeid mergefilelist parents
1817-
global diffopts diffinhunk currentfile diffblocked
1818-
global groupfilelast mergefds
1819+
global diffopts diffinhunk currentfile currenthunk filelines
1820+
global diffblocked groupfilelast mergefds groupfilenum grouphunks
18191821

18201822
set files $mergefilelist($diffmergeid)
18211823
foreach f $files {
@@ -1826,6 +1828,8 @@ proc showmergediff {} {
18261828
catch {unset currentfile}
18271829
catch {unset currenthunk}
18281830
catch {unset filelines}
1831+
catch {unset groupfilenum}
1832+
catch {unset grouphunks}
18291833
set groupfilelast -1
18301834
foreach p $parents($diffmergeid) {
18311835
set cmd [list | git-diff-tree -p $p $diffmergeid]
@@ -2700,7 +2704,7 @@ proc diffvssel {dirn} {
27002704
$ctext conf -state disabled
27012705
$ctext tag delete Comments
27022706
$ctext tag remove found 1.0 end
2703-
startdiff $newid [list $oldid]
2707+
startdiff [list $newid $oldid]
27042708
}
27052709

27062710
proc mkpatch {} {

0 commit comments

Comments
 (0)