Skip to content

Commit 4ff12c7

Browse files
Sort contributors by lines changed
Previously number of commits were used
1 parent 24e3dab commit 4ff12c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ yadm.md: yadm.1
170170
.PHONY: contrib
171171
contrib:
172172
@echo "CONTRIBUTORS\n" > CONTRIBUTORS
173-
@git shortlog -ns master gh-pages develop dev-pages | cut -f2 >> CONTRIBUTORS
173+
@IFS=$$'\n'; for author in $$(git shortlog -ns master gh-pages develop dev-pages | cut -f2); do \
174+
git log master gh-pages develop dev-pages \
175+
--author="$$author" --format=tformat: --numstat | \
176+
awk "{sum += \$$1 + \$$2} END {print sum \"\t\" \"$$author\"}"; \
177+
done | sort -nr | cut -f2 >> CONTRIBUTORS
174178

175179
.PHONY: install
176180
install:

0 commit comments

Comments
 (0)