From 4ff12c71252d80868494cfa0e13bbe94716ebe47 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Sat, 8 Aug 2020 15:40:29 -0500 Subject: [PATCH] Sort contributors by lines changed Previously number of commits were used --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e7895be..4b46d46 100644 --- a/Makefile +++ b/Makefile @@ -170,7 +170,11 @@ yadm.md: yadm.1 .PHONY: contrib contrib: @echo "CONTRIBUTORS\n" > CONTRIBUTORS - @git shortlog -ns master gh-pages develop dev-pages | cut -f2 >> CONTRIBUTORS + @IFS=$$'\n'; for author in $$(git shortlog -ns master gh-pages develop dev-pages | cut -f2); do \ + git log master gh-pages develop dev-pages \ + --author="$$author" --format=tformat: --numstat | \ + awk "{sum += \$$1 + \$$2} END {print sum \"\t\" \"$$author\"}"; \ + done | sort -nr | cut -f2 >> CONTRIBUTORS .PHONY: install install: