Get lines of code by file extension for a particular author?
sffc opened this issue · 3 comments
Thanks for building this tool!
I have a repo, and I want to know how many lines of Rust code I've contributed to it. Is that something this tool can tell me?
If I run git fame -t
, I get
Total ._None_ext: 15309
Total .bat: 41
...
Total .rs: 81316
...
Total commits: 1006
Total ctimes: 29296
Total files: 3871
Total loc: 510071
| Author | loc | coms | fils | distribution |
|:------------------------|------:|-------:|-------:|:----------------|
| Elango | 90506 | 65 | 505 | 17.7/ 6.5/13.0 |
| Manish Goregaokar | 84052 | 163 | 695 | 16.5/16.2/18.0 |
| Ting-Yu Lin | 62542 | 18 | 54 | 12.3/ 1.8/ 1.4 |
| Erik Nordin | 56941 | 21 | 265 | 11.2/ 2.1/ 6.8 |
| Shane F. Carr | 48403 | 347 | 613 | 9.5/34.5/15.8 |
...
The list at the top tells me contributions by language, and the table at the bottom tells me contributions by user. I want contributions by language by user. Alternatively, I would be okay invoking a command such as
$ git fame -e "me@example.com" -t
which would get analysis only for commits with that email address.
git fame --incl '\.rs$'
closing for now - happy to reopen if you want.
Thanks for this software, seems like just what I was looking for.
From the README:
Extra care should be taken when using ins and/or del for --loc since all historical files (including those no longer surviving) are counted. In such cases, --excl may need to be significantly extended.
I'm not proficient with regex, could you elaborate on what you mean by "significantly extended"? Say I added to your example above
git fame --incl '\.rs$' --loc=ins
Adding --loc=ins
without updating --incl
seems to remove the effect of the latter option. Is this expected behaviour?