Skip to content

Commit

Permalink
gitk: Fix display of newly-created tags
Browse files Browse the repository at this point in the history
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 <dave@dulson.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Dave Dulson authored and Paul Mackerras committed Jan 12, 2010
1 parent dfb891e commit fcacf48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitk
Original file line number Diff line number Diff line change
Expand Up @@ -10493,7 +10493,7 @@ proc showtag {tag isnew} {
set linknum 0
if {![info exists tagcontents($tag)]} {
catch {
set tagcontents($tag) [exec git cat-file tag $tagobjid($tag)]
set tagcontents($tag) [exec git cat-file tag $tag]
}
}
if {[info exists tagcontents($tag)]} {
Expand Down

0 comments on commit fcacf48

Please sign in to comment.