AlDanial / cloc

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.
GNU General Public License v2.0
19.78k stars 1.02k forks source link

[Enhancement] Report by git user email #714

Closed KarimFikani closed 1 year ago

KarimFikani commented 1 year ago

It would be nice to generate a report if I pass in as a param a git user email and it would count all the lines related to this email. Not sure about the implementation but using git blame for every file and count the lines that have the same email would be one way of doing it I guess. Thank you!

AlDanial commented 1 year ago

I'm not keen on this idea. My recommendation is to write a preprocessing script that performs the git blame search then redirect the file names to a list file, then pass this list file to cloc with --list-file.

If you do write such a script and are willing to share it, I'll add it as a user contribution.

KarimFikani commented 1 year ago

Sure I will try to make it happen. Thank you for responding!