6 ms·
Git script to measure contributor LOCs
- esharef 14y agoVery cool -- thanks for sharing.
- zalew 14y agoand for mercurial http://mercurial.selenic.com/wiki/ChurnExtension http://mercurial.selenic.com/wiki/ChurnExtension user LOC $ hg churn -t users@email 30454 **************************************************** users' changesets $ hg churn -c user1 65 **************************************************** user2 41 ********************************* user3 2 **
- prisonguard 14y agoIs LOC still a worthwhile metric to estimate developer productivity?
- kelnos 14y agoStill? It never was.
- prisonguard 14y agooh, the output seems more like a leader board to me.Typically this would make corporate heads roll with all sorts of conclusions
- kscaldef 14y agoMuch more extensive and detailed information is provided by https://github.com/hoxu/gitstats https://github.com/hoxu/gitstats
- amatus 14y agoFor those of us not on BSD: git ls-files -z | xargs -0 -n1 -E'\n' git blame --date short -wCMcp | perl -pe 's/^.*?\((.*?) +\d{4}-\d{2}-\d{2} +\d+\).*/\1/' | sort | uniq -c | sort -rn
- aidenn0 14y agogit blame -p is going to be easier to parse example: git blame --line-porcelain |awk 'BEGIN { ORS=" " } $1=="author" {for (i=2;i<=NF;++i) print $i; printf("\n")}'|sort|uniq -c|sort -n better: git ls-files -z|xargs -0 -n1 git blame --line-porcelain|awk '$1=="author" {auth=$2; for(i=3;i<=NF;++i) auth=auth " "$i; counts[auth]+=1} END {for(a in counts) print counts[a],a}'