Last active
August 29, 2015 13:56
-
-
Save CampingScorpion/8911573 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
(defun g-blame () | |
"Which commits last affected this line?" | |
(interactive) | |
(shell-command | |
(format "git show $(git blame '%s' -L %s,%s | awk '{print $1}')" | |
(buffer-file-name) | |
(line-number-at-pos) | |
(line-number-at-pos)))) | |
(defun g-churn () | |
"Which files have changed the most in the past 6 months?" | |
(interactive) | |
(shell-command | |
"set -e; git log --all -M -C --name-only --format='format:' \"--since='6 months ago'\" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print \"count\tfile\"} {print $1 \"\t\" $2}' | sort -g | tail -50")) | |
(defun g-who () | |
"Who has changed this file the most in the past 6 months?" | |
(interactive) | |
(shell-command | |
(concat "git log --format='%an' --since='6 months ago' " | |
(buffer-file-name) | |
" | sort | uniq -c | sort -rn"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment