From: Johannes Sixt Date: Tue, 29 Jul 2025 12:52:54 +0000 (+0200) Subject: gitk: avoid duplicated upstream refs X-Git-Tag: v2.51.0-rc1~10^2~5^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b28119551bc06986bdc9048ee30393b6b9b20c5f;p=thirdparty%2Fgit.git gitk: avoid duplicated upstream refs 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 --- diff --git a/gitk b/gitk index 38c2c81a79..b31d0b0a63 100755 --- 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] {