Skip to content

Commit

Permalink
gitk: Teach "Reread references" to reload tags
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Aguilar authored and Junio C Hamano committed Sep 9, 2012
1 parent a135f21 commit 9b5bdf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gitk
Original file line number Diff line number Diff line change
Expand Up @@ -10599,7 +10599,7 @@ proc movedhead {hid head} {
}

proc changedrefs {} {
global cached_dheads cached_dtags cached_atags
global cached_dheads cached_dtags cached_atags tagcontents
global arctags archeads arcnos arcout idheads idtags

foreach id [concat [array names idheads] [array names idtags]] {
Expand All @@ -10611,6 +10611,7 @@ proc changedrefs {} {
}
}
}
catch {unset tagcontents}
catch {unset cached_dtags}
catch {unset cached_atags}
catch {unset cached_dheads}
Expand Down

0 comments on commit 9b5bdf5

Please sign in to comment.