Skip to content

Commit fcacf48

Browse files
davedulsonpaulusmack
authored andcommitted
gitk: Fix display of newly-created tags
If the user creates a tag with the "create tag" dialog in gitk and then clicks on the newly-created tag, its contents don't get displayed. The reason is that rereadrefs hasn't been called, meaning the tag doesn't exist in $tagobjid. This causes the cat-file to fail. Instead of using $tagobjid, pass the $tag directly, ensuring the tag contents are populated correctly. Signed-off-by: David Dulson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent dfb891e commit fcacf48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10493,7 +10493,7 @@ proc showtag {tag isnew} {
1049310493
set linknum 0
1049410494
if {![info exists tagcontents($tag)]} {
1049510495
catch {
10496-
set tagcontents($tag) [exec git cat-file tag $tagobjid($tag)]
10496+
set tagcontents($tag) [exec git cat-file tag $tag]
1049710497
}
1049810498
}
1049910499
if {[info exists tagcontents($tag)]} {

0 commit comments

Comments
 (0)