git-fame icon indicating copy to clipboard operation
git-fame copied to clipboard

support `--incl` & `--excl` when `--loc=ins,del`

Open tredeske opened this issue 1 year ago • 3 comments

Using the containerized version (podman on linux), --excl appears to have no effect on loc or other stats.

$ podman run --rm -it --userns=keep-id -v /path/to/myrepo:/repo:Z casperdcl/git-fame -s --since 91.days --cost cocomo -M -C --excl='.*' --loc 'ins,del'

$ podman run --rm -it --userns=keep-id -v /path/to/myrepo:/repo:Z casperdcl/git-fame -v
2.0.1

$ git --version
git version 2.31.1

Exclusions tried:

  • --excl='dir' - to exclude a dir
  • --excl='.*/dir/.*' - to exclude a dir
  • --excl='.*dir/.*' - to exclude a dir
  • --excl='.*file.*' - to exclude a file
  • --excl='.*' - exclude everything

Using -n with explicitly listed files also fails to exclude.

Using --log=DEBUG verifies that the regex was received by git-fame as expected.

Using --incl='regex' also appears to have no effect. Examples:

  • --incl='.*file' - should just include the one file, but includes all files
  • --incl='non-existent-file' - still includes everything

tredeske avatar Mar 24 '23 11:03 tredeske

if you use any loc other than surv, the excl parameter got ignored

ntcong avatar Jul 13 '23 17:07 ntcong

Maybe something worth mentioning on --help. :)

twam avatar Oct 02 '23 12:10 twam

An update to the cmdline help would be useful, as would emitting an error if loc conflicts with excl. Better would be enabling excl to have an effect regardless of loc.

tredeske avatar Jan 15 '24 15:01 tredeske