gitk: Fix bug caused by missing commitlisted elements
This bug was reported by Yann Dirson, and results in an 'Error: expected boolean value but got ""' dialog when scrolling to the bottom of the graph under some circumstances. The issue is that git-rev-list isn't outputting all the boundary commits when it is asked for commits affecting only certain files. We already cope with that by adding the missing boundary commits in addextraid, but there we weren't adding a 0 to the end of the commitlisted list when we added the extra id to the end of the displayorder list. This fixes it by appending 0 to commitlisted in addextraid, thus keeping commitlisted and displayorder in sync. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
Apr 17, 2006 at 10:27 UTC
e7da347520486ce33bb77d241b574787c0ec18e8
1 file changed
+3
-2
gitk
+3
-2
@@ -1116,11 +1116,12 @@ proc layoutrows {row endrow last} {
1116
1117
proc addextraid {id row} {
1118
global displayorder commitrow commitinfo
1119
- global commitidx
1119
+ global commitidx commitlisted
1120
global parentlist childlist children
1121
1122
incr commitidx
1123
lappend displayorder $id
1124
+ lappend commitlisted 0
1125
lappend parentlist {}
1126
set commitrow($id) $row
1127
readcommit $id
@@ -1500,7 +1501,7 @@ proc drawcmittext {id row col rmx} {
1501
proc drawcmitrow {row} {
1502
global displayorder rowidlist
1503
global idrowranges idrangedrawn iddrawn
1503
- global commitinfo commitlisted parentlist numcommits
1504
+ global commitinfo parentlist numcommits
1505
1506
if {$row >= $numcommits} return
1507
foreach id [lindex $rowidlist $row] {