Repository navigation
Add experimental 'git survey' builtin - #5174
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces
git surveyto Git for Windows ahead of upstream for the express purpose of getting the path-based analysis in the hands of more folks.The inspiration of this builtin is
git-sizer, but since that command relies ongit cat-file --batchto get the contents of objects, it has limits to how much information it can provide.This is mostly a rewrite of the
git surveybuiltin that was introduced into themicrosoft/gitfork in microsoft#667. That version had a lot more bells and whistles, including an analysis much closer to whatgit-sizerprovides.The biggest difference in this version is that this one is focused on using the path-walk API in order to visit batches of objects based on a common path. This allows identifying, for instance, the path that is contributing the most to the on-disk size across all versions at that path.
For example, here are the top ten paths contributing to my local Git repository (which includes
microsoft/gitandgitster/git):This kind of analysis has been helpful in identifying the reasons for growth in a few internal monorepos. Those findings motivated the changes in #5157 and #5171.
With this early version in Git for Windows, we can expand the reach of the experimental tool in advance of it being contributed to the upstream project.
Unfortunately, this will mean that in the next
microsoft/gitrebase, @jeffhostetler's version will need to be pulled out since there are enough conflicts. These conflicts include how tables are stored and generated, as the version in this PR is slightly more general to allow for different kinds of data.