From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>
To: git@vger.kernel.org
Cc: jltobler@gmail.com, "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>
Subject: [PATCH 0/1] repo: add filtering options to "repo structure"
Date: Thu, 24 Sep 2026 12:45:02 -0400 [thread overview]
Message-ID: <20260924164503.119506-1-markchucarroll@fastmail.com> (raw)
repo: add filtering options to "repo structure"
"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 exclude
refs that are known to not be relevant to the issue at hand.
Add a set of flags that allow a user to selective exclude
reference types from the report generated by "git repo structure".
When a ref type is excluded by the filter, it no longer appears
in the report (ie, if "--no-tags" is passed, the report line
for "Branches" will no longer appear under "* References").
Following the pattern of flags that are only used to
disable functionality (eg, "--no-verify" in "builtins/push.c"),
only the "--no-<reftype>" syntax is listed in the updated
documentation.
Overview of the changes:
- Add an enum to represent the structure flags.
- Add structure flags to the options for the "repo structure" commands.
- For each reference flag, add a conditional in "count_references"
which decides whether or not to add a ref to the pending list.
If an references is not added to the pending list, the things it
transitively references will not be added to the stats.
- Add a set of test cases to verify that reference counts
in the repo structure report correctly omit the specified
resource types.
- Update the documentation for git-repo to include the new options.
Mark C. Chu-Carroll (1):
repo: add filtering options to "repo structure"
Documentation/git-repo.adoc | 35 ++++-
builtin/repo.c | 158 +++++++++++++++------
t/t1901-repo-structure.sh | 276 ++++++++++++++++++++++++++++++++++++
3 files changed, 427 insertions(+), 42 deletions(-)
--
2.53.0
next reply other threads:[~2026-09-24 16:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 16:45 Mark C. Chu-Carroll [this message]
2026-09-24 16:45 ` [PATCH 1/1] repo: add filtering options to "repo structure" Mark C. Chu-Carroll
2026-09-30 16:28 ` Patrick Steinhardt
2026-10-05 18:52 ` Mark C. Chu-Carroll
2026-10-05 17:40 ` [PATCH v2 0/1] " Mark C. Chu-Carroll
2026-10-05 17:40 ` [PATCH v2 1/1] " Mark C. Chu-Carroll
2026-10-06 5:51 ` Patrick Steinhardt
2026-10-08 15:46 ` Kaartic Sivaraam
2026-10-09 15:49 ` Mark C. Chu-Carroll
2026-10-09 18:09 ` [PATCH v3 0/1] repo: add revision " Mark C. Chu-Carroll
2026-10-09 18:09 ` [PATCH v3 1/1] repo: add " Mark C. Chu-Carroll
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260924164503.119506-1-markchucarroll@fastmail.com \
--to=markchucarroll@fastmail.com \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox