From f4478983462087f68d06328a81ac4bc323be9765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 10 Dec 2015 11:50:27 +0100 Subject: [PATCH] Simplify `git thanks` implementation --- bin/git-thanks | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/git-thanks b/bin/git-thanks index 86ed1f8..938793a 100755 --- a/bin/git-thanks +++ b/bin/git-thanks @@ -3,10 +3,6 @@ # # Show authorship info sorted by the number of commits during ``. -git log "$1" | - grep Author: | - sed 's/Author: \(.*\) <.*/\1/' | - sort | - uniq -c | - sort -rn | - sed 's/ *\([0-9]\{1,\}\) \(.*\)/\2 (\1)/' \ No newline at end of file +git log --format='%an' "$1" | \ + sort | uniq -c | sort -rn | \ + sed 's/ *\([0-9]\{1,\}\) \(.*\)/\2 (\1)/'