summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2025-10-04 15:36:12 +0200
committerJohannes Sixt <j6t@kdbg.org>2025-10-04 15:36:12 +0200
commitd7cedce06364305f1fa8d0571232f15aa5e4507e (patch)
tree59735dc8c58d70d8a66116e26d31a03781009220
parentac8fec7d8de265e56441713faaf4e08f11c31469 (diff)
parent88189dd7cb535486b74bcf50997253797f4b999c (diff)
Merge branch 'mr/sort-refs-by-type'
* mr/sort-refs-by-type: gitk: fix error when remote tracking branch is deleted
-rwxr-xr-xgitk4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitk b/gitk
index 6e4d71d585..3cfc9ef291 100755
--- a/gitk
+++ b/gitk
@@ -10294,7 +10294,9 @@ 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)] && [commitinview $headids($upstreamofref($n)) $curview]} {
+ if {[info exists upstreamofref($n)] && \
+ [info exists headids($upstreamofref($n))] && \
+ [commitinview $headids($upstreamofref($n)) $curview]} {
lappend trackedremoterefs [list $upstreamofref($n) R]
}
} else {