Merge branch 'mr/sort-refs-by-type'

* mr/sort-refs-by-type:
  gitk: filter invisible upstream refs from reference list
  gitk: avoid duplicated upstream refs

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
This commit is contained in:
Johannes Sixt
2025-08-01 18:35:16 +02:00

4
gitk
View File

@@ -10238,7 +10238,7 @@ proc refill_reflist {} {
if {![string match "remotes/*" $n] && [string match $reflistfilter $n]} {
if {[commitinview $headids($n) $curview]} {
lappend localrefs [list $n H]
if {[info exists upstreamofref($n)]} {
if {[info exists upstreamofref($n)] && [commitinview $headids($upstreamofref($n)) $curview]} {
lappend trackedremoterefs [list $upstreamofref($n) R]
}
} else {
@@ -10246,7 +10246,7 @@ proc refill_reflist {} {
}
}
}
set trackedremoterefs [lsort -index 0 $trackedremoterefs]
set trackedremoterefs [lsort -index 0 -unique $trackedremoterefs]
set localrefs [lsort -index 0 $localrefs]
foreach n [array names headids] {