[PATCH v2 0/1] repo: add filtering options to "repo structure"
- From
- Mark C. Chu-Carroll <markchucarroll@fastmail.com>
- Date
- Oct 5, 2026, 17:40 UTC
- Message-ID
- <20261005174045.1900391-1-markchucarroll@fastmail.com>
- In-Reply-To
- <20260924164503.119506-2-markchucarroll@fastmail.com>
"git repo structure" provides a collection of useful information about the information stored in a repo. In particular, it's valuable for diagnosing performance issues caused by large objects stored in a repo.
The current implementation of "git repo stucture" provides summary information about everything in the repository - all of the branches, remotes, tags, stashes, and notes. But sometimes to properly diagnose a problem, it's useful to be able to get information about the specific part of the repo that's exhibiting a problem.
Add the option to specify a set of filters in the form of a list of include and exclude queries. Each of these specifies a commit or ref or range. The set of objects processed will consist of all objects reachable from any of the includes which are _not_ reached exclusively by paths including any of the excludes.
Updates since v1: this change has been completely rewritten. The original version implemented filters the same way as "git-sizer", by selecting object types to include or exclude. This version drops he type-based filters in favor of specifying object traversal roots and exclusions.
Mark C. Chu-Carroll (1): repo: add filtering options to "repo structure"
Documentation/git-repo.adoc | 41 ++++++++++++++++-- builtin/repo.c | 16 +++++-- t/t1901-repo-structure.sh | 84 +++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+), 8 deletions(-)
-- 2.53.0