mirror of
https://github.com/arzzen/git-quick-stats.git
synced 2026-09-12 08:36:17 -04:00
Merge pull request #8 from kidd/first-last-commits
Add first -> last commits for each author.
This commit is contained in:
commit
afa91dff42
|
|
@ -36,6 +36,7 @@ function detailedGitStats() {
|
|||
git log --no-merges --numstat | awk '
|
||||
function printStats(author) {
|
||||
printf "%s:\n", author
|
||||
printf " first -> last: %s -> %s \n", first[author] , last[author]
|
||||
printf " insertions: %d (%.0f%%)\n", more[author], (more[author] / more["total"] * 100)
|
||||
printf " deletions: %d (%.0f%%)\n", less[author], (less[author] / less["total"] * 100)
|
||||
printf " files: %d (%.0f%%)\n", file[author], (file[author] / file["total"] * 100)
|
||||
|
|
@ -48,6 +49,12 @@ function detailedGitStats() {
|
|||
commits["total"] += 1
|
||||
}
|
||||
|
||||
/^Date:/ {
|
||||
$1="";
|
||||
first[author] = substr($0, 2)
|
||||
if(last[author] == "" ) { last[author] = first[author] }
|
||||
}
|
||||
|
||||
/^[0-9]/ {
|
||||
more[author] += $1
|
||||
less[author] += $2
|
||||
|
|
|
|||
Loading…
Reference in a new issue