git/list[1] front-page[2] threads[3] people[4] search[5] about
 

gitk bug: annotated tag displays as a lightweight tag when branch of the same name is on the same commit

From
DHDavid Holmer <odinguru@gmail.com>
Date
May 5, 2010, 14:17 UTC
Message-ID
<loom.20100505T155543-396@post.gmane.org>

I found an edge case bug in the display behavior of gitk. I encountered it while working in a repository where we make branches with a name like "1.0.3" and create an annotated tag "1.0.3" when everything is ready on that branch. In the process of scripting some of this, I thought I was not creating the annotated tags correctly because when I'd look at them in gitk, they were showing up as lightweight tags. However I noticed that "git describe" was showing the tag name correctly, and thus the issue was in gitk.

The bug can be simply reproduced by the following sequence of commands:

git init touch test git add test git commit -m "commit message" git tag -am "annotated tag message" master gitk

The master tag is displayed in gitk pane as a lightweight tag rather than an annotated tag:

Tag: master
Id:  5b0a763ec5791da4981f14ff5f6ef6384117945c
However if I move the master branch on to a new commit or rename it:
git branch -m renamed
Then the tag is correctly displayed by gitk as an annotated tag:

object 5b0a763ec5791da4981f14ff5f6ef6384117945c type commit tag master tagger David Holmer <xxxxx@xxxxxxxxxxx> 1273068181 -0400

annotated tag message

Thank you, David

Message 1 of 1 in “gitk bug: annotated tag displays as a lightweight tag when branch of the same name is on the same commit”
  1. David HolmerMay 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.