Skip to content

Commit 587277f

Browse files
davvidgitster
authored andcommitted
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 <[email protected]> Signed-off-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9b5bdf5 commit 587277f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

gitk

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10599,7 +10599,7 @@ proc movedhead {hid head} {
1059910599
}
1060010600

1060110601
proc changedrefs {} {
10602-
global cached_dheads cached_dtags cached_atags tagcontents
10602+
global cached_dheads cached_dtags cached_atags cached_tagcontent
1060310603
global arctags archeads arcnos arcout idheads idtags
1060410604

1060510605
foreach id [concat [array names idheads] [array names idtags]] {
@@ -10611,7 +10611,7 @@ proc changedrefs {} {
1061110611
}
1061210612
}
1061310613
}
10614-
catch {unset tagcontents}
10614+
catch {unset cached_tagcontent}
1061510615
catch {unset cached_dtags}
1061610616
catch {unset cached_atags}
1061710617
catch {unset cached_dheads}
@@ -10664,7 +10664,7 @@ proc listrefs {id} {
1066410664
}
1066510665

1066610666
proc showtag {tag isnew} {
10667-
global ctext tagcontents tagids linknum tagobjid
10667+
global ctext cached_tagcontent tagids linknum tagobjid
1066810668

1066910669
if {$isnew} {
1067010670
addtohistory [list showtag $tag 0] savectextpos
@@ -10673,13 +10673,13 @@ proc showtag {tag isnew} {
1067310673
clear_ctext
1067410674
settabs 0
1067510675
set linknum 0
10676-
if {![info exists tagcontents($tag)]} {
10676+
if {![info exists cached_tagcontent($tag)]} {
1067710677
catch {
10678-
set tagcontents($tag) [exec git cat-file tag $tag]
10678+
set cached_tagcontent($tag) [exec git cat-file tag $tag]
1067910679
}
1068010680
}
10681-
if {[info exists tagcontents($tag)]} {
10682-
set text $tagcontents($tag)
10681+
if {[info exists cached_tagcontent($tag)]} {
10682+
set text $cached_tagcontent($tag)
1068310683
} else {
1068410684
set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)"
1068510685
}

0 commit comments

Comments
 (0)