parsing git log output, preferably as xml

后端 未结 1 415
野的像风
野的像风 2020-12-13 22:35

I want to parse the output from git log. My current tool does this for svn by parsing the --xml option that svn log has. I can\'t seem to figure out how to output git log

相关标签:
1条回答
  • 2020-12-13 23:17

    You could build your own simple xml output by using the formatting options.

    git log --pretty=format:"<entry><author>%an</author><commit_date>%cd</commit_date><message_body>%b</message_body></entry>"
    

    Just add whatever fields you want. (You'll need to script a bit if you want proper xml header etc.)

    See man git-log PRETTY FORMATS section the list of fields you have access to.

    0 讨论(0)
提交回复
热议问题