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

Re: Strange annotated tag issue

From
Bryan Turner <bturner@atlassian.com>
Date
Mar 21, 2019, 19:04 UTC
Message-ID
<CAGyf7-F4vvzwVsdgtiog+xvwgHgYkNMKQ59bCxrZYtdn+eGAPw@mail.gmail.com>
In-Reply-To
<CAHd499BM91tf7f8=phR4Az8vMsHAHUGYsSb1x9as=WukUVZHJw@mail.gmail.com>
On Thu, Mar 21, 2019 at 9:59 AM Robert Dailey <rcdailey.lists@gmail.com> wrote:
Show 24 quoted lines
>
> I have a particular tag in my repo that shows 2 annotated
> descriptions, which is very confusing.
>
> The command I ran:
>
> ```
> git show --format=fuller 4.2.0.1900
> ```
>
> And the output:
>
> ```
> tag 4.2.0/1900
> Tagger:     John Doe <john.doe@domain.com>
> TaggerDate: Fri Jul 18 10:46:30 2014 -0500
>
> QA/Internal Release for 4.2.0.19
>
> tag 4.2.0/1900
> Tagger:     John Doe <john.doe@domain.com>
> TaggerDate: Fri Jul 18 10:46:15 2014 -0500
>
> QA/Internal Release

Not sure about this part, though I notice that the two rows have different "TaggerDate" values by ~15 seconds.

Show 18 quoted lines
>
> commit 2fcfd00ef84572fb88852be55315914f37e91e11 (tag: 4.2.0.1900)
> Author:     John Doe <john.doe@domain.com>
> AuthorDate: Thu Jul 17 11:20:17 2014 -0500
> Commit:     John Doe <john.doe@domain.com>
> CommitDate: Thu Jul 17 11:20:17 2014 -0500
>
>     Commit description
> ```
>
> Why does it show two entries? In my `packed-refs` file, it also shows
> a strange revision for the tag (I expect to see just 1 SHA1). Not sure
> if it is related:
>
> ```
> 66c41d67da887025c4e22e9891f5cd261f82eb31 refs/tags/4.2.0.1900
> ^2fcfd00ef84572fb88852be55315914f37e91e11
> ```

This part, though, is normal for "packed-refs". The first line shows the annotated tag object's hash ("66c41d67da8") and the tagged object's hash ("2fcfd00ef8"). You can see that "2fcfd00ef8" matches the tagged commit output by "git show". The leading "^" on the second line is how Git knows the line identifies a peeled tag's target rather than the start of a new ref. If your "packed-refs" starts with "peeled" (and maybe "fully-peeled") then every annotated (or signed) tag in the file should have a second line prefixed by "^".

Hopefully this at least resolves part of your question!
Bryan
Show 5 quoted lines
>
> Note I'm checking all of this on a bare clone (used `git clone
> --mirror`). Can someone help me understand what is going on here? I
> found this issue because I'm trying to do `git lfs migrate import`,
> and it isn't processing my tag because of this.
Previous: Robert DaileyNext: Jeff King
Message 2 of 48 in “Strange annotated tag issue”
  1. Robert DaileyMar 21, 2019
  2. Bryan TurnerMar 21, 2019
  3. Jeff KingMar 21, 2019
  4. Jeff KingMar 21, 2019
  5. Robert DaileyMar 25, 2019
  6. Jeff KingMar 25, 2019
  7. Robert DaileyMar 25, 2019
  8. Bryan TurnerMar 25, 2019
  9. Jeff KingMar 25, 2019
  10. Ævar Arnfjörð BjarmasonMar 25, 2019
  11. Jeff KingMar 25, 2019
  12. 0/3 tag: prevent recursive tagsDenton Liu, Mar 26, 2019
  13. 1/3 tag: prevent recursive tagsDenton Liu, Mar 26, 2019
  14. Denton LiuMar 26, 2019
  15. Ævar Arnfjörð BjarmasonMar 26, 2019
  16. Elijah NewrenMar 27, 2019
  17. Ævar Arnfjörð BjarmasonMar 27, 2019
  18. Robert DaileyMar 28, 2019
  19. 2/3 t7004: ensure recursive tag behavior is workingDenton Liu, Mar 26, 2019
  20. Ævar Arnfjörð BjarmasonMar 26, 2019
  21. 3/3 git-tag.txt: document --allow-recursive-tag optionDenton Liu, Mar 26, 2019
  22. Ævar Arnfjörð BjarmasonMar 26, 2019
  23. Jeff KingMar 26, 2019
  24. 0/2 tag: prevent nested tagsDenton Liu, Apr 2, 2019
  25. 1/2 tag: fix formattingDenton Liu, Apr 2, 2019
  26. 2/2 tag: prevent nested tagsDenton Liu, Apr 2, 2019
  27. 2/2 tag: prevent nested tagsDenton Liu, Apr 2, 2019
  28. Junio C HamanoApr 3, 2019
  29. Junio C HamanoApr 3, 2019
  30. Robert DaileyApr 3, 2019
  31. Junio C HamanoApr 4, 2019
  32. Robert DaileyApr 4, 2019
  33. Junio C HamanoApr 4, 2019
  34. Robert DaileyApr 5, 2019
  35. Johannes SixtApr 3, 2019
  36. Denton LiuApr 3, 2019
  37. Jeff KingApr 4, 2019
  38. Junio C HamanoApr 4, 2019
  39. Jeff KingApr 4, 2019
  40. Junio C HamanoApr 4, 2019
  41. Jeff KingApr 4, 2019
  42. Eckhard MaaßApr 11, 2019
  43. Junio C HamanoApr 12, 2019
  44. Elijah NewrenApr 5, 2019
  45. Junio C HamanoApr 5, 2019
  46. 0/2 tag: advise on recursive taggingDenton Liu, Apr 4, 2019
  47. 1/2 tag: fix formattingDenton Liu, Apr 4, 2019
  48. 2/2 tag: advise on nested tagsDenton Liu, Apr 4, 2019

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.