title: Git log JSON *with changed files*
body: <p>I need to get the output of a git log command formatted as JSON. I like the approach suggested in <a href="https://stackoverflow.com/questions/4600445/git-log-output-to-xml-json-or-yaml">Git log output to XML, JSON, or YAML?</a> to use a custom git log pretty formatter and a light layer of perl processing on top using the command <a href="https://gist.githubusercontent.com/textarcana/1306223/raw/bf185bdf6dc2a70316d36769a7d31584afc2fd95/git-log2json.sh" rel="nofollow noreferrer">here</a>:</p>
  
  <pre><code>git log \
  --pretty=format:'{%n  "commit": "%H",%n  "author": "%an &lt;%ae&gt;",%n  "date": "%ad",%n  "message": "%f"%n},' \
  $@ | \
  perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
  perl -pe 's/},]/}]/'
  </code></pre>
  
  <p>This works fantastic for getting those certain fields, but I also need the list of files changed that is returned from using the --name-status flag included in the JSON output.</p>
  
  <p>I've tried various approaches but I'm at a loss at how to approach this. My gut tells me I'm missing something obvious. Any ideas?</p>
  
  <p>Thanks!</p>