Should Git Tag trailer formatting work?
- From
Brooke Kuhlmann <brooke@alchemists.io>
- Date
- Sep 5, 2024, 16:05 UTC
- Message-ID
- <E46F3EFF-66D1-4B29-BCF3-6FFAB2504411@alchemists.io>
Hello. đź‘‹
With the recent release of Git 2.46.0, the ability to add trailers to tags was added which is great! However, when attempting to list and format trailer information, I don't see the trailer information display using the following Bash code:
```
git tag --list \
--color \
--format="%(color:yellow)%(refname:short)%(color:reset)|%(taggerdate:short)|%(color:blue)%(color:bold)%(taggername)%(color:reset)|%(subject)|%(trailers:key=Insertions)" \
| column -s"|" -t
```Notice that I'm using the same syntax (`%(trailers:key=Insertions)`) as used in the git for-each-ref (https://git-scm.com/docs/git-for-each-ref#Documentation/git-for-each-ref.txt-rawsize) documentation. If it helps, I also create my Git tag using `git tag` and formatting my message as follows:
``` Version 0.0.0
An example.
Insertions: 10 ```
Shouldn't the formatting of my git tags pick up the "Insertions" trailer key and print it? Is this a bug or am I doing something wrong?
Thanks!