{"thread":{"id":"22159","subject":"[PATCH/RFC 2/2] Remove $tagobjid from tagcontents population","startedAt":"2010-01-10T22:45:52Z","lastAt":"2010-01-10T22:45:52Z","messageCount":1,"participants":["Dave Dulson"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"131243","messageId":"2ee0b0aa1001101445u5962ec25y6fe612a70d283c92@mail.gmail.com","threadId":"22159","inReplyTo":null,"subject":"[PATCH/RFC 2/2] Remove $tagobjid from tagcontents population","fromName":"Dave Dulson","fromEmail":"dave@dulson.com","sentAt":"2010-01-10T22:45:52Z","receivedAt":"2010-01-10T22:45:52Z","isPatch":true,"sender":{"key":"dave@dulson.com","avatar":"https://avatars.githubusercontent.com/u/763872?v=4"},"body":"When the showtag proc is called directly after the tag has been\ncreated rereadrefs hasn't been called, meaning the tag doesn't exist\nin $tagobjid. This causes the cat-file to fail.\nInstead of using $tagobjid, pass the $tag directly, ensuring the tag\ncontents are populated correctly.\n\nSigned-off-by: David Dulson <dave@dulson.com>\n---\n gitk |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex b34b481..65721e3 100755\n--- a/gitk\n+++ b/gitk\n@@ -10482,7 +10482,7 @@ proc listrefs {id} {\n }\n\n proc showtag {tag isnew} {\n-    global ctext tagcontents tagids linknum tagobjid\n+    global ctext tagcontents tagids linknum\n\n     if {$isnew} {\n \taddtohistory [list showtag $tag 0] savectextpos\n@@ -10493,7 +10493,7 @@ proc showtag {tag isnew} {\n     set linknum 0\n     if {![info exists tagcontents($tag)]} {\n \tcatch {\n-\t    set tagcontents($tag) [exec git cat-file tag $tagobjid($tag)]\n+           set tagcontents($tag) [exec git cat-file tag $tag]\n \t}\n     }\n     if {[info exists tagcontents($tag)]} {\n-- \n1.6.6.75.g37bae.dirty\n"}]}