gitk: Teach "Reread references" to reload tags
Tag contents, once read, are forever cached in memory. This makes gitk unable to notice when tag contents change. Allow users to cause a reload of the tag contents by using the "File->Reread references" action. Reported-by: Tim McCormack <cortex@brainonfire.net> Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Aguilar committed
Sep 8, 2012 at 12:03 UTC
9b5bdf5913f850d1fc72c4219f794e2de549957f
1 file changed
+2
-1
gitk
+2
-1
@@ -10599,7 +10599,7 @@ proc movedhead {hid head} {
10599
}
10600
10601
proc changedrefs {} {
10602
- global cached_dheads cached_dtags cached_atags
10602
+ global cached_dheads cached_dtags cached_atags tagcontents
10603
global arctags archeads arcnos arcout idheads idtags
10604
10605
foreach id [concat [array names idheads] [array names idtags]] {
@@ -10611,6 +10611,7 @@ proc changedrefs {} {
10611
}
10612
}
10613
}
10614
+ catch {unset tagcontents}
10615
catch {unset cached_dtags}
10616
catch {unset cached_atags}
10617
catch {unset cached_dheads}