GIT contribution per author (lines)

空扰寡人 提交于 2019-12-03 07:33:35
morne

Okay, after more investigation I found this on SO.

git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*?\((.*?)\s+[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n  

The answer came with support from Eric Z

RESULT

    234926 USER 1
     32453 USER 2
   2941234 USER 3

This means the first part of your expression is not giving any results. Try

git ls-tree -r -z --name-only HEAD -- */*.c

without the latter part; probably that gives you empty output. Fix that expression to list the files you want to work on... If I use that in a repository not containing any .c files; it gives me the same error as you. Either removing the option */*.c or fixing it to */*.cpp fixed it (depending on the outcome you want)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!