Created
February 18, 2015 21:17
-
-
Save pauladam/eb9256c9e1098a6b50d6 to your computer and use it in GitHub Desktop.
cc recommender
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
| #!/bin/sh | |
| user=`git st | grep 'modified' | cut -d ":" -f 2 | tr -d ' ' | while read fn; do | |
| git --no-pager blame $fn | |
| done | cut -d " " -f 2- | cut -d ')' -f 1 | sed 's/[0-9].*//' | tr -d '(' | sort | uniq -c | sort -n | tail -r | head -n 1 | cut -d ' ' -f 3-` | |
| echo $user | |
| cat $1 > /tmp/commit-msg | |
| echo '\n' > $1 | |
| echo "cc: $user" >> $1 | |
| cat /tmp/commit-msg >> $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment