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

parsing `git cat-file tag <tag-id>`

From
clime <clime7@gmail.com>
Date
Mar 5, 2020, 07:24 UTC
Message-ID
<CAGqZTUv=KTtm454mSs47hmLJd-GvXxhkypPqqgkabo3=6moCbg@mail.gmail.com>

Hello, I need to parse output of `git cat-file tag <tag-id>` in bash to get information from the (annotated) tag like author, email, date, subject, body. Everyone has ever done something similar?

What would be the recommended tool in bash?

Originally, my problem is that I have tag-id and I would like to directly from tag-id by calling a git command the individual fields from the tag content. I don't want any <tag-id> to <tag-name> translation first and i cannot use for-each-ref --points-at=<tag-id> because it's not in older versions of git. Thank you very much!

clime
Message 1 of 1 in “parsing `git cat-file tag <tag-id>`”
  1. climeMar 5, 2020

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.