]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitk: avoid duplicated upstream refs
authorJohannes Sixt <j6t@kdbg.org>
Tue, 29 Jul 2025 12:52:54 +0000 (14:52 +0200)
committerJohannes Sixt <j6t@kdbg.org>
Wed, 30 Jul 2025 06:44:51 +0000 (08:44 +0200)
It is possible that multiple local branches track the same upstream.
In this case, the refs dialog lists the tracked upstream branch
multiple times. This is undesirable. Make them unique.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
gitk

diff --git a/gitk b/gitk
index 38c2c81a79eb31dddd23f2f7507a0638c71992a8..b31d0b0a63ed0a2c31e001f75e53c4c0a4717493 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -10340,7 +10340,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] {