-
Notifications
You must be signed in to change notification settings - Fork 159
Scan starting at arbitrary roots #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It wasn't used.
This provides a better separation of concerns, which will be taken advantage of shortly.
We want to add another type of root, so start the virtualization process.
Instead of only traversing objects starting at references, allow the user to specify explicit Git objects via the command line. In that case, the traversal includes objects reachable from those objects.
Sweet! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting aside the linter's failures, it looks amazing ! Thank you 🙇♂️
I just pushed a commit to fix the linter problem. @elhmn: if you're OK with the change, feel free to merge this. @elhmn and I also discussed that this should probably not bother scanning references at all or reporting their counts when run in "explicit-root-only" mode. He's going to take a stab at implementing that change. Feel free to implement it as part of this PR or to merge this one and implement it as part of a separate PR. |
Have you ever wanted to compute
git-sizer
stats for a particular part of your history, for example a single tree? This PR implements that feature.git-sizer
now allows arbitrary ROOT argument, likewhich would show the stats for the whole source tree of the
main
commit, but for no other commits. If at least one ROOT argument is specified, then the usual behavior of scanning references doesn't happen, unless you also specify options to select references, likewhich would include all references, plus the previous version of branch
main
(which might give different results if, for example,main
just had a non-fast-forward update).The new ROOT objects will also be used (in the form that they appeared in the command-line) in the names that are shown in the footnotes.
/cc @elhmn, @vtbassmatt