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

[PATCH 00/10] tree: stop using the_repository

From
René Scharfe <l.s.r@web.de>
Date
Jan 9, 2026, 21:30 UTC
Message-ID
<20260109213021.2546-1-l.s.r@web.de>

The tree parsing functions use the_repository internally. Add variants that allow using arbitrary repositories. Fix callers one by one for which had USE_THE_REPOSITORY_VARIABLE removed despite this implicit usage and convert the rest mechanically.

  environment: move access to core.maxTreeDepth into repo settings
  tree: add repo_parse_tree*()
  add-interactive: use repo_parse_tree_indirect()
  bloom: use repo_parse_tree()
  delta-islands: use repo_parse_tree()
  pack-bitmap-write: use repo_parse_tree()
  path-walk: use repo_parse_tree_gently()
  tree: use repo_parse_tree()
  tree: stop using the_repository
  cocci: convert parse_tree functions to repo_ variants
 add-interactive.c                       |  2 +-
 archive.c                               |  2 +-
 bloom.c                                 |  2 +-
 builtin/am.c                            | 10 ++++-----
 builtin/checkout.c                      | 12 +++++-----
 builtin/clone.c                         |  4 ++--
 builtin/commit.c                        |  5 +++--
 builtin/diff-tree.c                     |  2 +-
 builtin/ls-tree.c                       |  2 +-
 builtin/merge-tree.c                    |  9 +++++---
 builtin/merge.c                         |  8 +++----
 builtin/read-tree.c                     |  4 ++--
 builtin/reset.c                         |  4 ++--
 builtin/stash.c                         |  8 +++----
 cache-tree.c                            |  2 +-
 contrib/coccinelle/the_repository.cocci | 10 +++++++++
 delta-islands.c                         |  2 +-
 diff-lib.c                              |  2 +-
 environment.c                           | 29 -------------------------
 environment.h                           |  1 -
 fsck.c                                  |  2 +-
 git-compat-util.h                       | 24 ++++++++++++++++++++
 http-push.c                             |  2 +-
 list-objects.c                          |  4 ++--
 merge-ort.c                             | 13 ++++++-----
 merge.c                                 |  6 ++---
 pack-bitmap-write.c                     |  2 +-
 path-walk.c                             |  2 +-
 read-cache.c                            |  2 +-
 repo-settings.c                         |  3 +++
 repo-settings.h                         |  3 +++
 reset.c                                 |  2 +-
 revision.c                              |  4 ++--
 sequencer.c                             |  4 ++--
 t/helper/test-cache-tree.c              |  2 +-
 t/helper/test-match-trees.c             |  4 ++--
 tree-diff.c                             |  2 +-
 tree-walk.c                             |  4 +++-
 tree.c                                  | 16 ++++++--------
 tree.h                                  | 13 +++++++----
 walker.c                                |  2 +-
 41 files changed, 129 insertions(+), 107 deletions(-)
-- 
2.52.0
Next: René Scharfe
Message 1 of 25 in “tree: stop using the_repository”
  1. 00/10 tree: stop using the_repositoryRené Scharfe, Jan 9, 2026
  2. 03/10 add-interactive: use repo_parse_tree_indirect()René Scharfe, Jan 9, 2026
  3. 04/10 bloom: use repo_parse_tree()René Scharfe, Jan 9, 2026
  4. 08/10 tree: use repo_parse_tree()René Scharfe, Jan 9, 2026
  5. Patrick SteinhardtJan 12, 2026
  6. 09/10 tree: stop using the_repositoryRené Scharfe, Jan 9, 2026
  7. Patrick SteinhardtJan 12, 2026
  8. Junio C HamanoJan 12, 2026
  9. Patrick SteinhardtJan 12, 2026
  10. Junio C HamanoJan 12, 2026
  11. Junio C HamanoJan 12, 2026
  12. Patrick SteinhardtJan 12, 2026
  13. René ScharfeJan 12, 2026
  14. Patrick SteinhardtJan 13, 2026
  15. 10/10 cocci: convert parse_tree functions to repo_ variantsRené Scharfe, Jan 9, 2026
  16. 02/10 tree: add repo_parse_tree*()René Scharfe, Jan 9, 2026
  17. 01/10 environment: move access to core.maxTreeDepth into repo settingsRené Scharfe, Jan 9, 2026
  18. Patrick SteinhardtJan 12, 2026
  19. René ScharfeJan 12, 2026
  20. 07/10 path-walk: use repo_parse_tree_gently()René Scharfe, Jan 9, 2026
  21. 05/10 delta-islands: use repo_parse_tree()René Scharfe, Jan 9, 2026
  22. 06/10 pack-bitmap-write: use repo_parse_tree()René Scharfe, Jan 9, 2026
  23. 11/10 cocci: remove obsolete the_repository rulesRené Scharfe, Jan 15, 2026
  24. Patrick SteinhardtJan 16, 2026
  25. Junio C HamanoJan 16, 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.