gitk: Rename 'tagcontents' to 'cached_tagcontent'

Name the 'tagcontents' variable similarly to the rest of the variables cleared in the changedrefs() function. This makes the naming consistent and provides a hint that it should be cleared when reloading gitk's cache. 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:53 UTC 587277fea3bf3bfc4302480178bd88a277a69f05
1 file changed +7 -7
gitk
+7 -7
@@ -10599,7 +10599,7 @@ proc movedhead {hid head} {
10599 }
10600
10601 proc changedrefs {} {
10602 - global cached_dheads cached_dtags cached_atags tagcontents
10602 + global cached_dheads cached_dtags cached_atags cached_tagcontent
10603 global arctags archeads arcnos arcout idheads idtags
10604
10605 foreach id [concat [array names idheads] [array names idtags]] {
@@ -10611,7 +10611,7 @@ proc changedrefs {} {
10611 }
10612 }
10613 }
10614 - catch {unset tagcontents}
10614 + catch {unset cached_tagcontent}
10615 catch {unset cached_dtags}
10616 catch {unset cached_atags}
10617 catch {unset cached_dheads}
@@ -10664,7 +10664,7 @@ proc listrefs {id} {
10664 }
10665
10666 proc showtag {tag isnew} {
10667 - global ctext tagcontents tagids linknum tagobjid
10667 + global ctext cached_tagcontent tagids linknum tagobjid
10668
10669 if {$isnew} {
10670 addtohistory [list showtag $tag 0] savectextpos
@@ -10673,13 +10673,13 @@ proc showtag {tag isnew} {
10673 clear_ctext
10674 settabs 0
10675 set linknum 0
10676 - if {![info exists tagcontents($tag)]} {
10676 + if {![info exists cached_tagcontent($tag)]} {
10677 catch {
10678 - set tagcontents($tag) [exec git cat-file tag $tag]
10678 + set cached_tagcontent($tag) [exec git cat-file tag $tag]
10679 }
10680 }
10681 - if {[info exists tagcontents($tag)]} {
10682 - set text $tagcontents($tag)
10681 + if {[info exists cached_tagcontent($tag)]} {
10682 + set text $cached_tagcontent($tag)
10683 } else {
10684 set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)"
10685 }