github / git-sizer

Compute various size metrics for a Git repository, flagging those that might cause problems
MIT License
3.48k stars 139 forks source link

Allow subsets of references to be defined via gitconfig #84

Closed mhagger closed 3 years ago

mhagger commented 3 years ago

I thought it would be handy to allow users to define subsets of references via gitconfig, and for those to be usable by git-sizer to pick and choose what references to scan. For example, maybe you want to ignore GitHub pull request references?

[refgroup "no-pull"]
        exclude = refs/pull

then run git-sizer --refgroup=no-pull. Or you want a way to scan branches and tags, but not release tags? Try

[refgroup "normal"]
        include = refs/heads
        include = refs/tags
        excludeRegexp = refs/tags/release-.*

and then run git sizer --refgroup=normal.

/cc @terrorobe, @ttaylorr

mhagger commented 3 years ago

:bulb: It might aid discoverability for the help output to list the refgroups that are currently defined.