gitk: filter invisible upstream refs from reference list

In refill_reflist, upstream refs are now only included if their commits are visible in the current view. This prevents display issues like multiple highlighted branches when clicking entries. Signed-off-by: Michael Rappazzo <michael.rappazzo@infor.com>

Michael Rappazzo committed Jul 31, 2025 at 07:53 UTC 9965cc771b6b43a8852a4950a196180f2c616891
1 file changed +1 -1
gitk
+1 -1
@@ -10332,7 +10332,7 @@ proc refill_reflist {} {
10332 if {![string match "remotes/*" $n] && [string match $reflistfilter $n]} {
10333 if {[commitinview $headids($n) $curview]} {
10334 lappend localrefs [list $n H]
10335 - if {[info exists upstreamofref($n)]} {
10335 + if {[info exists upstreamofref($n)] && [commitinview $headids($upstreamofref($n)) $curview]} {
10336 lappend trackedremoterefs [list $upstreamofref($n) R]
10337 }
10338 } else {