I need to get the output of a git log command formatted as JSON. I like the approach suggested in Git log output to XML, JSON, or YAML? to use a custom git log pretty format
I know little about Perl. Here is my way to get the changed files of a commit. Hope it helps.
git log -1 --pretty=%h --name-only | tail -n +3