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>maint
parent
9b5bdf5913
commit
587277fea3
14
gitk
14
gitk
|
|
@ -10599,7 +10599,7 @@ proc movedhead {hid head} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc changedrefs {} {
|
proc changedrefs {} {
|
||||||
global cached_dheads cached_dtags cached_atags tagcontents
|
global cached_dheads cached_dtags cached_atags cached_tagcontent
|
||||||
global arctags archeads arcnos arcout idheads idtags
|
global arctags archeads arcnos arcout idheads idtags
|
||||||
|
|
||||||
foreach id [concat [array names idheads] [array names idtags]] {
|
foreach id [concat [array names idheads] [array names idtags]] {
|
||||||
|
|
@ -10611,7 +10611,7 @@ proc changedrefs {} {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch {unset tagcontents}
|
catch {unset cached_tagcontent}
|
||||||
catch {unset cached_dtags}
|
catch {unset cached_dtags}
|
||||||
catch {unset cached_atags}
|
catch {unset cached_atags}
|
||||||
catch {unset cached_dheads}
|
catch {unset cached_dheads}
|
||||||
|
|
@ -10664,7 +10664,7 @@ proc listrefs {id} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc showtag {tag isnew} {
|
proc showtag {tag isnew} {
|
||||||
global ctext tagcontents tagids linknum tagobjid
|
global ctext cached_tagcontent tagids linknum tagobjid
|
||||||
|
|
||||||
if {$isnew} {
|
if {$isnew} {
|
||||||
addtohistory [list showtag $tag 0] savectextpos
|
addtohistory [list showtag $tag 0] savectextpos
|
||||||
|
|
@ -10673,13 +10673,13 @@ proc showtag {tag isnew} {
|
||||||
clear_ctext
|
clear_ctext
|
||||||
settabs 0
|
settabs 0
|
||||||
set linknum 0
|
set linknum 0
|
||||||
if {![info exists tagcontents($tag)]} {
|
if {![info exists cached_tagcontent($tag)]} {
|
||||||
catch {
|
catch {
|
||||||
set tagcontents($tag) [exec git cat-file tag $tag]
|
set cached_tagcontent($tag) [exec git cat-file tag $tag]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if {[info exists tagcontents($tag)]} {
|
if {[info exists cached_tagcontent($tag)]} {
|
||||||
set text $tagcontents($tag)
|
set text $cached_tagcontent($tag)
|
||||||
} else {
|
} else {
|
||||||
set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)"
|
set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue