Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function escape_chars {
sed 's/"/""/g'
function format {
date=$(git log -n1 --pretty=format:%cD "$1" | escape_chars)
author=$(git log -n1 --pretty=format:'%aN <%aE>' "$1" | escape_chars)
sha=$(git log -n1 --pretty=format:%h "$1" | escape_chars)
message=$(git log -n1 --pretty=format:%B "$1" | escape_chars)
echo "\"$date\",\"$author\",\"$sha\",\"$message\""
echo '"date","author","sha","message"'
for hash in $(git rev-list --all)
format $hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.