git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk: Teach "Reread references" to reload tags

From
David Aguilar <davvid@gmail.com>
Date
Sep 8, 2012, 19:03 UTC
Message-ID
<1347130993-69863-1-git-send-email-davvid@gmail.com>
In-Reply-To
<7vligmz9zc.fsf@alter.siamese.dyndns.org>

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>
---
 gitk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index 9bba9aa..a124822 100755
--- a/gitk
+++ b/gitk
@@ -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]] {
@@ -10611,6 +10611,7 @@ proc changedrefs {} {
 	    }
 	}
     }
+    catch {unset tagcontents}
     catch {unset cached_dtags}
     catch {unset cached_atags}
     catch {unset cached_dheads}
-- 
1.7.7.2.448.gee6df
Previous: Junio C HamanoNext: David Aguilar
Message 4 of 8 in “gitk does not reload tag messages”
  1. Tim McCormackSep 6, 2012
  2. David AguilarSep 7, 2012
  3. Junio C HamanoSep 7, 2012
  4. gitk: Teach "Reread references" to reload tagsDavid Aguilar, Sep 8, 2012
  5. gitk: Rename 'tagcontents' to 'cached_tagcontent'David Aguilar, Sep 8, 2012
  6. Junio C HamanoSep 9, 2012
  7. Junio C HamanoSep 12, 2012
  8. Paul MackerrasSep 12, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.