Preserve tag annotations
See original GitHub issueThe technique this tool uses for checking out tags only preserves the relation between tag and ref, not any annotations created with git tag -a
.
git fetch origin +$HASH:refs/tags/$TAG
git checkout -f refs/tag/$TAG
I have a CI action that depends on information from annotated tags. Specifically, the name of the person who applied the tag: git tag --list --points-at HEAD --format '%(taggeremail)'
(I can’t use ${{ github.actor }}
for reasons).
The workaround is to run git fetch -f origin ${{ github.ref }}:${{ github.ref }}
. But it would be better not to need this workaround.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:47
- Comments:23
Top Results From Across the Web
How To Correct Tagged Annotations When They Failed the ...
How To Correct Tagged Annotations When They Failed the Accessibility Check in a Form.
Read more >How do I change the date of an annotated Git tag without ...
The answer you linked simply creates a new annotated tag, ... To save the tag's message, use git cat-file -p $tag (or git...
Read more >Git - Tagging - Git SCM
Annotated tags, however, are stored as full objects in the Git database. They're checksummed; contain the tagger name, email, and date; have a...
Read more >Disabling tag sets - IBM
The concept of disabled tag sets allows the preservation of changes when the descriptor file is being used for edits. If you change...
Read more >Annotated and Lightweight Git Tags | HackerNoon
Annotated tags store extra metadata such as author name, release notes, tag-message, and date as full objects in the Git database. All this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Agreed! This breaks the “git describe” command too. We need tags to be in their correct original form.
+1 on preserving tag annotations.
fetch-depth: 0
alone doesn’t help,git fetch --tags --force
does help.