0

We use git/GitLab to collaborate on a project which involves digitizing/proof-reading of old/ancient books. Editors are paid per contributed chars. Till now we used something like wc -m * to find out how many chars were contributed. This approach assumes that all files are contributed by one person AND that all files contributed by that person are in the current directory. Real situation is actually different. Editors may fix each others' files and their files might be spread over several directories.

Is there a way in git (probably involving --author= flag) to find out the amount of characters contributed by an author in the whole repository in HEAD (i.e. its current state, not accumulative amount of chars in all history). Maybe using Bash/pipes?

user1876484
  • 520
  • 2
  • 13
  • Does this answer your question? [GIT contribution per author (lines)](https://stackoverflow.com/questions/25449075/git-contribution-per-author-lines) – phd Feb 27 '20 at 21:28
  • https://stackoverflow.com/search?q=%5Bgit%5D+count+contribution+by+author – phd Feb 27 '20 at 21:28
  • @phd - it counts lines, doesn't it? I need chars... – user1876484 Feb 27 '20 at 21:30
  • 1
    You're going to have to do something like scraping the output of `git log --author=soso -p --=word-diff` – jthill Feb 28 '20 at 00:58
  • How do you define "amount of characters contributed"? Does it only include adding of new characters? How does removal of characters count toward the amount? – Shangjian Ding Feb 28 '20 at 02:25
  • @ShangjianDing - removal doesn't count. Only characters that are currently there. – user1876484 Feb 28 '20 at 08:16

0 Answers0