0

I wanted to measure the number of lines of code for each developer in the tip of develop branch at this point of time for python files. How can I make that happen?

More like this: Initialise a counter for each developer to 0. For each python file in project, blame each line. Increment the counter of the respective developer.

I do not want the overall addition deletion numbers. Only what exists in the HEAD of the branch.

Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96

1 Answers1

0

Try this bash one-liner:

find -name '*.py' -type f -exec git annotate  -e -- {} \; | cut -f2 -d $'\t' | grep -oP '[^<>]{2,}' | sort | uniq -c

It outputs not names, but e-mails.

Mikhail Golubtsov
  • 6,285
  • 3
  • 29
  • 36