Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

GitDataClient.createAnnotatedTag() creates a simple tag instead of an annotated tag #76

Description

@solarhess

This method is supposed to create an annotated tag. It creates a simple tag instead.

According to the github create a tag api docs (emphasis added)

Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then create the refs/tags/[tag] reference. If you want to create a lightweight tag, you only have to create the tag reference - this call would be unnecessary.

They fail to mention that the refs/tags/[tag] reference should be to the tag object not to the commit. If you do this with a real repository.

When I create a tag using the existin gimplementation, I get a simple tag, not an annotated one:

$ git cat-file -p valid-main-20210917T162830
tree 27793a753db63b1705269e2727292f88b8e363f5
parent ee26020ac582dbafe276a3482653657666419d55
author xxxxx 1626388655 -0600
committer xxxxx 1626388655 -0600

Fixes checkstyle from refactoring

When I fix the implementation, the git data is correct, showing an annotated tag.

$ git cat-file -p valid-main-20210917T164327
object ce43212b8b8fd2b37fbad58f5023bbef2abcf261
type commit
tag valid-main-20210917T164327
tagger xxxxxx 1631897008 +0000

Test create tag

I will submit a PR with the fix to the method and the test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions