Creating a git show to display parsing information

I read the git parsing of the log output, preferably as xml , but that doesn't help. I am trying to get the following git tag information

  • Tag creator
  • Tag creation message, if any
  • The name of the tag (I know this, since I already pass it), but I want them to be output, so that I can just pass all the output back to my caller
  • Last commit id in this tag

I would prefer them as csv or space / tab separted, so I tried to use the --format option. I tried something like

git show my_label_name --pretty=format:"%an, %cn" --quiet 

but it does not give what I want. Can anybody help me?

0
source share
1 answer
 git cat-file tag <tag_name> 

will give you the actual contents of the file representing this tag (useful unpacked and uncompressed).

Example

 $ git init $ touch README $ git add README $ git commit -m 'Initial commit' $ git tag -a foo -m 'Tagging foo' $ git cat-file tag foo object 91654534f5ac138a3adb56a9e6dc3bacae5bae53 type commit tag foo tagger Peter Lundgren < peter@peterlundgren.com > 1369779403 -0400 Tagging foo 
+1
source

Source: https://habr.com/ru/post/946102/


All Articles