mirror of
https://github.com/git/git.git
synced 2024-11-01 06:47:52 +01:00
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 <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
c0d92c2221
commit
d809fb17b0
1 changed files with 2 additions and 2 deletions
4
gitk
4
gitk
|
@ -10582,13 +10582,13 @@ proc anctags {id} {
|
|||
# including id itself if it has a head.
|
||||
proc descheads {id} {
|
||||
global arcnos arcstart arcids archeads idheads cached_dheads
|
||||
global allparents
|
||||
global allparents arcout
|
||||
|
||||
if {![info exists allparents($id)]} {
|
||||
return {}
|
||||
}
|
||||
set aret {}
|
||||
if {[llength $arcnos($id)] == 1 && [llength $allparents($id)] == 1} {
|
||||
if {![info exists arcout($id)]} {
|
||||
# part-way along an arc; check it first
|
||||
set a [lindex $arcnos($id) 0]
|
||||
if {$archeads($a) ne {}} {
|
||||
|
|
Loading…
Reference in a new issue