Skip to content

Commit e7da347

Browse files
committed
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 <[email protected]>
1 parent c5a4c4d commit e7da347

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gitk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,11 +1116,12 @@ proc layoutrows {row endrow last} {
11161116

11171117
proc addextraid {id row} {
11181118
global displayorder commitrow commitinfo
1119-
global commitidx
1119+
global commitidx commitlisted
11201120
global parentlist childlist children
11211121

11221122
incr commitidx
11231123
lappend displayorder $id
1124+
lappend commitlisted 0
11241125
lappend parentlist {}
11251126
set commitrow($id) $row
11261127
readcommit $id
@@ -1500,7 +1501,7 @@ proc drawcmittext {id row col rmx} {
15001501
proc drawcmitrow {row} {
15011502
global displayorder rowidlist
15021503
global idrowranges idrangedrawn iddrawn
1503-
global commitinfo commitlisted parentlist numcommits
1504+
global commitinfo parentlist numcommits
15041505

15051506
if {$row >= $numcommits} return
15061507
foreach id [lindex $rowidlist $row] {

0 commit comments

Comments
 (0)