Skip to content

Commit d809fb1

Browse files
committed
gitk: Fix display of branch names on some commits
Sometimes the code that divides commits up into arcs creates two successive arcs, but the commit between them (the commit at the end of the first arc and the beginning of the second arc) has only one parent and one child. If that commit is also the head of one or more branches, those branches get omitted from the "Branches" field in the commit display. The omission occurs because the commit gets erroneously identified as a commit which is part-way along an arc in [descheads]. This fixes it by changing the test to look at the arcouts array, which only contains elements for the commits at the start or end of an arc. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent c0d92c2 commit d809fb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10582,13 +10582,13 @@ proc anctags {id} {
1058210582
# including id itself if it has a head.
1058310583
proc descheads {id} {
1058410584
global arcnos arcstart arcids archeads idheads cached_dheads
10585-
global allparents
10585+
global allparents arcout
1058610586

1058710587
if {![info exists allparents($id)]} {
1058810588
return {}
1058910589
}
1059010590
set aret {}
10591-
if {[llength $arcnos($id)] == 1 && [llength $allparents($id)] == 1} {
10591+
if {![info exists arcout($id)]} {
1059210592
# part-way along an arc; check it first
1059310593
set a [lindex $arcnos($id) 0]
1059410594
if {$archeads($a) ne {}} {

0 commit comments

Comments
 (0)