HomePhabricator

ListTags: Fix ref in TagInfo for signed/annotated tags

Authored by Edwin Kempin <ekempin@google.com> on Oct 6 2015, 5:14 PM.

Description

ListTags: Fix ref in TagInfo for signed/annotated tags

'Constants.R_TAGS + tag.getTagName()' was used as ref for the TagInfo,
but tag.getTagName() returns the name of the tag from the tag header
which might be different from the ref name.

E.g. create an annotated tag refs/tags/T1 and push it twice, once as
refs/tags/T1 and once as refs/tags/T2:

$ git tag -a T1
$ git push refs/tags/T1:refs/tags/T1
$ git push refs/tags/T1:refs/tags/T2

In the target repository you get 2 tags with different refs
(refs/tags/T1 and refs/tags/T2), but both tags have the same tag name
in the header (T1).

Change-Id: Ia67f9fc96926d2b98a16330c5d96b9e842417f19
Signed-off-by: Edwin Kempin <ekempin@google.com>

Event Timeline

Edwin Kempin <ekempin@google.com> committed rGERRITDEPLOY0ec0d19c468c: ListTags: Fix ref in TagInfo for signed/annotated tags (authored by Edwin Kempin <ekempin@google.com>).Oct 7 2015, 11:34 AM