Commit stats

Paul Vriens paul.vriens.wine at gmail.com
Thu Jan 1 06:44:06 CST 2009


Hans Leidekker wrote:
> $ for year in {2002..2008}; do \
>   count=$( git log | grep ^Date: | grep $year | wc -l ); \
>   echo "Number of commits in $year: $count"; \
>   done
> Number of commits in 2002: 3094
> Number of commits in 2003: 3283
> Number of commits in 2004: 3851
> Number of commits in 2005: 6006
> Number of commits in 2006: 8431
> Number of commits in 2007: 9532
> Number of commits in 2008: 11292
> 
>  -Hans
> 
> 
I had a look at these stats as I'm (still) playing around with gitstat 
in combination with Wine. The numbers didn't match up so I had a closer 
look. 'git log' shows the author date and not the commit date.

So maybe this one is more correct?

$ for year in {2002..2008}; do \
   count=$(git log --pretty='format:%cd' | grep $year | wc -l ); \
   echo "Number of commits in $year: $count"; \
   done
Number of commits in 2002: 3094
Number of commits in 2003: 3283
Number of commits in 2004: 3851
Number of commits in 2005: 6006
Number of commits in 2006: 8404
Number of commits in 2007: 9540
Number of commits in 2008: 11307

Oh and btw, Happy New Year to all !

-- 
Cheers,

Paul.



More information about the wine-devel mailing list