Skip to content

Commit f463cc5

Browse files
committed
Merge branch 'da/gitk-reload-tag-contents' into maint-1.7.11
* da/gitk-reload-tag-contents: gitk: Rename 'tagcontents' to 'cached_tagcontent' gitk: Teach "Reread references" to reload tags gitk: Avoid Meta1-F5
2 parents 6711759 + 587277f commit f463cc5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

gitk-git/gitk

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,7 @@ proc makewindow {} {
20382038
set file {
20392039
mc "File" cascade {
20402040
{mc "Update" command updatecommits -accelerator F5}
2041-
{mc "Reload" command reloadcommits -accelerator Meta1-F5}
2041+
{mc "Reload" command reloadcommits -accelerator Shift-F5}
20422042
{mc "Reread references" command rereadrefs}
20432043
{mc "List references" command showrefs -accelerator F2}
20442044
{xx "" separator}
@@ -2495,7 +2495,7 @@ proc makewindow {} {
24952495
bindkey ? {dofind -1 1}
24962496
bindkey f nextfile
24972497
bind . <F5> updatecommits
2498-
bind . <$M1B-F5> reloadcommits
2498+
bind . <Shift-F5> reloadcommits
24992499
bind . <F2> showrefs
25002500
bind . <Shift-F4> {newview 0}
25012501
catch { bind . <Shift-Key-XF86_Switch_VT_4> {newview 0} }
@@ -10599,7 +10599,7 @@ proc movedhead {hid head} {
1059910599
}
1060010600

1060110601
proc changedrefs {} {
10602-
global cached_dheads cached_dtags cached_atags
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,6 +10611,7 @@ proc changedrefs {} {
1061110611
}
1061210612
}
1061310613
}
10614+
catch {unset cached_tagcontent}
1061410615
catch {unset cached_dtags}
1061510616
catch {unset cached_atags}
1061610617
catch {unset cached_dheads}
@@ -10663,7 +10664,7 @@ proc listrefs {id} {
1066310664
}
1066410665

1066510666
proc showtag {tag isnew} {
10666-
global ctext tagcontents tagids linknum tagobjid
10667+
global ctext cached_tagcontent tagids linknum tagobjid
1066710668

1066810669
if {$isnew} {
1066910670
addtohistory [list showtag $tag 0] savectextpos
@@ -10672,13 +10673,13 @@ proc showtag {tag isnew} {
1067210673
clear_ctext
1067310674
settabs 0
1067410675
set linknum 0
10675-
if {![info exists tagcontents($tag)]} {
10676+
if {![info exists cached_tagcontent($tag)]} {
1067610677
catch {
10677-
set tagcontents($tag) [exec git cat-file tag $tag]
10678+
set cached_tagcontent($tag) [exec git cat-file tag $tag]
1067810679
}
1067910680
}
10680-
if {[info exists tagcontents($tag)]} {
10681-
set text $tagcontents($tag)
10681+
if {[info exists cached_tagcontent($tag)]} {
10682+
set text $cached_tagcontent($tag)
1068210683
} else {
1068310684
set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)"
1068410685
}

0 commit comments

Comments
 (0)