Skip to content

Commit

Permalink
Merge branch 'da/gitk-reload-tag-contents' of git://github.com/gitste…
Browse files Browse the repository at this point in the history
…r/git

to get two commits from David Aguilar.
  • Loading branch information
Paul Mackerras committed Sep 12, 2012
2 parents 0ae1035 + 587277f commit 5be4d35
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -10599,7 +10599,7 @@ proc movedhead {hid head} {
}

proc changedrefs {} {
global cached_dheads cached_dtags cached_atags
global cached_dheads cached_dtags cached_atags cached_tagcontent
global arctags archeads arcnos arcout idheads idtags

foreach id [concat [array names idheads] [array names idtags]] {
Expand All @@ -10611,6 +10611,7 @@ proc changedrefs {} {
}
}
}
catch {unset cached_tagcontent}
catch {unset cached_dtags}
catch {unset cached_atags}
catch {unset cached_dheads}
Expand Down Expand Up @@ -10663,7 +10664,7 @@ proc listrefs {id} {
}

proc showtag {tag isnew} {
global ctext tagcontents tagids linknum tagobjid
global ctext cached_tagcontent tagids linknum tagobjid

if {$isnew} {
addtohistory [list showtag $tag 0] savectextpos
Expand All @@ -10672,13 +10673,13 @@ proc showtag {tag isnew} {
clear_ctext
settabs 0
set linknum 0
if {![info exists tagcontents($tag)]} {
if {![info exists cached_tagcontent($tag)]} {
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)]} {
set text $tagcontents($tag)
if {[info exists cached_tagcontent($tag)]} {
set text $cached_tagcontent($tag)
} else {
set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)"
}
Expand Down

0 comments on commit 5be4d35

Please sign in to comment.