aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2025-08-01 18:35:16 +0200
committerJohannes Sixt <j6t@kdbg.org>2025-08-01 18:35:16 +0200
commitf896039388e0a3a2da819e57941cbf41204e6448 (patch)
treefe198083c07d5df9ef0d16a21f10972ad9514028
parent2d3f3f01270a47bed15db774b577b22a9c9c8d9e (diff)
parent9965cc771b6b43a8852a4950a196180f2c616891 (diff)
downloadgit-f896039388e0a3a2da819e57941cbf41204e6448.tar.xz
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>
-rwxr-xr-xgitk4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitk b/gitk
index 427a8a96c9..0eb1f5fecc 100755
--- a/gitk
+++ b/gitk
@@ -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] {