Skip to content

Instantly share code, notes, and snippets.

View toocool's full-sized avatar

Shpëtim Islami toocool

  • Vienna, Austria
View GitHub Profile
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'