Enhace statistics tool
This commit is contained in:
parent
f0ebe74fba
commit
1dfc95fd40
1 changed files with 5 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo "Usage: $0 YEAR"
|
||||
echo "Usage: $0 YEARSTART [YEAREND]"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
@ -13,6 +13,9 @@ fi
|
|||
FROM=$1-01-01
|
||||
TO=$1-12-31
|
||||
|
||||
if [ "x$2" != "x" ]; then
|
||||
TO=$2-12-31
|
||||
fi
|
||||
|
||||
echo "--- Number of contributors for the year"
|
||||
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
|
||||
|
|
@ -20,4 +23,4 @@ git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
|
|||
|
||||
|
||||
echo "--- Number of commit for the year"
|
||||
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' | grep "Year: $1"
|
||||
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{ if ($2 >= '$1') { print "Year: "$2", commits: "$1 } }'
|
||||
|
|
|
|||
Loading…
Reference in a new issue