Skip to content

Instantly share code, notes, and snippets.

@logie17
Created January 10, 2017 16:21
Show Gist options
  • Save logie17/7bb2077a1754f66425bef0652af813e1 to your computer and use it in GitHub Desktop.
Save logie17/7bb2077a1754f66425bef0652af813e1 to your computer and use it in GitHub Desktop.
longest_commit
#!/usr/bin/env bash
set -e
#git rev-list --no-merges "${1:-HEAD}" | \
# while read rev; do
# if [ $(git show -s --format='%b' $rev | wc -w) -gt 300 ]; then
# echo "$(git show -s --format='%b' $rev | wc -w) words: $rev"
# fi
# done #| \
# #sort -rn | head -5
git log --format='**commit:%H,%an,%b' | grep -v commit | \
while read foo; do
if [ $($foo | wc -w) -gt 300 ]; then
echo $foo
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment