Created
April 12, 2016 03:56
-
-
Save stretchkennedy/74739588858f3083e63516d73bc9cfca to your computer and use it in GitHub Desktop.
This file contains 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
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) | |
do | |
format $hash | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment