git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/1] repo: add filtering options to "repo structure"

From
MCMark C. Chu-Carroll <markchucarroll@fastmail.com>
Date
Sep 24, 2026, 16:45 UTC
Message-ID
<20260924164503.119506-1-markchucarroll@fastmail.com>
    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: Mark C. Chu-Carroll
Message 1 of 7 in “repo: add filtering options to "repo structure"”
  1. 0/1 repo: add filtering options to "repo structure"Mark C. Chu-Carroll, Sep 24, 2026
  2. 1/1 repo: add filtering options to "repo structure"Mark C. Chu-Carroll, Sep 24, 2026
  3. Patrick SteinhardtSep 30, 2026
  4. Mark C. Chu-CarrollOct 5, 2026
  5. 0/1 repo: add filtering options to "repo structure"Mark C. Chu-Carroll, Oct 5, 2026
  6. 1/1 repo: add filtering options to "repo structure"Mark C. Chu-Carroll, Oct 5, 2026
  7. Patrick SteinhardtOct 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.