-
-
Save infoburp/3809090 to your computer and use it in GitHub Desktop.
git log JSON format > d3? HTML5GOURCE?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
log-json = log --pretty=format:'\"%h\": {%n \"commit\": \"%H\",%n \"author\": \"%an <%ae>\",%n \"date\": \"%ad\",%n \"message\": \"%s\"%n}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this one-liner to produce a JavaScript object literal from the output of the JSON log format: | |
git log-json -n5 | perl -pe 'BEGIN{print "var git_log = {"}; s/}/},/; END{print "};\n"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment