Git development
 help / color / mirror / Atom feed
* [PATCH 0/5] refs: reduce reliance on the_repository global state
@ 2026-03-25 16:44 Shreyansh Paliwal
  2026-03-25 16:44 ` [PATCH 1/5] refs: make branchname helpers repository aware Shreyansh Paliwal
                   ` (5 more replies)
  0 siblings, 6 replies; 48+ messages in thread
From: Shreyansh Paliwal @ 2026-03-25 16:44 UTC (permalink / raw)
  To: git; +Cc: Shreyansh Paliwal

This series continues the effort to reduce reliance on the_repository
global state by making repository context explicit across the refs
subsystem. The patches focus on passing struct repository through various
ref helpers and backends, and replacing uses of global state such as
the_repository and the_hash_algo with the appropriate repository instance.

Patch 1/5: Making branch name helper functions (copy_branchname(),
check_branch_ref(), validate_branchname(), and validate_new_branchname())
repository-aware. (built on top of jw/object-name-bitset-to-enum)

Patch 2/5: Updating get_files_ref_lock_timeout_ms() to take a repository
and propagating it through files-backend, including callback paths.

Patch 3/5: Replacing uses of the_hash_algo in refs.c with the hash
algorithm from the appropriate repository.

Patch 4/5: Removing remaining uses of the_repository in reftable-backend.c
where a repository instance is already available.

Patch 5/5: Replacing the single instance of the_repository in
packed-backend.c, thus dropping the USE_THE_REPOSITORY_VARIABLE macro.

Shreyansh Paliwal (5):
  refs: make branchname helpers repository aware
  refs: make get_files_ref_lock_timeout_ms() repostory aware
  refs: remove the_hash_algo global state
  refs/reftable-backend: drop uses of the_repository
  refs/packed-backend: use ref_store->repo instead of the_repository

 branch.c                   | 15 ++++++++-------
 branch.h                   |  5 +++--
 builtin/branch.c           | 14 +++++++-------
 builtin/check-ref-format.c |  3 ++-
 builtin/checkout.c         |  6 +++---
 builtin/merge.c            |  2 +-
 builtin/worktree.c         | 10 +++++-----
 refs.c                     | 28 +++++++++++++---------------
 refs.h                     |  5 +++--
 refs/files-backend.c       | 19 +++++++++++++------
 refs/packed-backend.c      |  3 +--
 refs/refs-internal.h       |  2 +-
 refs/reftable-backend.c    |  6 +++---
 13 files changed, 63 insertions(+), 55 deletions(-)

--
2.53.0


^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2026-04-08 17:10 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 16:44 [PATCH 0/5] refs: reduce reliance on the_repository global state Shreyansh Paliwal
2026-03-25 16:44 ` [PATCH 1/5] refs: make branchname helpers repository aware Shreyansh Paliwal
2026-03-27  7:49   ` Patrick Steinhardt
2026-03-28 12:45     ` Shreyansh Paliwal
2026-03-25 16:44 ` [PATCH 2/5] refs: make get_files_ref_lock_timeout_ms() repostory aware Shreyansh Paliwal
2026-03-27  7:50   ` Patrick Steinhardt
2026-03-27  9:23   ` Burak Kaan Karaçay
2026-03-28 12:51     ` Shreyansh Paliwal
2026-03-25 16:44 ` [PATCH 3/5] refs: remove the_hash_algo global state Shreyansh Paliwal
2026-03-25 16:44 ` [PATCH 4/5] refs/reftable-backend: drop uses of the_repository Shreyansh Paliwal
2026-03-27  7:50   ` Patrick Steinhardt
2026-03-25 16:44 ` [PATCH 5/5] refs/packed-backend: use ref_store->repo instead " Shreyansh Paliwal
2026-03-28 14:09 ` [PATCH v2 0/5] refs: reduce reliance on the_repository global state Shreyansh Paliwal
2026-03-28 14:09   ` [PATCH v2 1/5] refs: make branchname helpers repository aware Shreyansh Paliwal
2026-03-28 16:54     ` Tian Yuchen
2026-03-29  9:55       ` Shreyansh Paliwal
2026-03-29 15:37         ` Tian Yuchen
2026-03-28 14:09   ` [PATCH v2 2/5] refs: make get_files_ref_lock_timeout_ms() repostory aware Shreyansh Paliwal
2026-03-28 14:09   ` [PATCH v2 3/5] refs: remove the_hash_algo global state Shreyansh Paliwal
2026-03-28 17:03     ` Tian Yuchen
2026-03-28 14:09   ` [PATCH v2 4/5] refs/reftable-backend: drop uses of the_repository Shreyansh Paliwal
2026-03-28 14:09   ` [PATCH v2 5/5] refs/packed-backend: use ref_store->repo instead " Shreyansh Paliwal
2026-03-28 17:08     ` Tian Yuchen
2026-03-29  9:54       ` Shreyansh Paliwal
2026-03-29 10:16   ` [PATCH v3 0/5] replace the_repository with local repository instances Shreyansh Paliwal
2026-03-29 10:16     ` [PATCH v3 1/5] refs: add struct repository parameter to branchname helpers Shreyansh Paliwal
2026-04-02  7:27       ` Patrick Steinhardt
2026-04-02 17:03         ` Burak Kaan Karaçay
2026-04-02 17:48           ` Tian Yuchen
2026-04-02 18:57           ` Patrick Steinhardt
2026-04-03 10:39             ` Shreyansh Paliwal
2026-03-29 10:16     ` [PATCH v3 2/5] refs: add struct repository parameter in get_files_ref_lock_timeout_ms() Shreyansh Paliwal
2026-03-29 10:16     ` [PATCH v3 3/5] refs: remove the_hash_algo global state Shreyansh Paliwal
2026-03-29 10:16     ` [PATCH v3 4/5] refs/reftable-backend: drop uses of the_repository Shreyansh Paliwal
2026-04-02  7:27       ` Patrick Steinhardt
2026-04-03 10:43         ` Shreyansh Paliwal
2026-03-29 10:16     ` [PATCH v3 5/5] refs/packed-backend: use ref_store->repo instead " Shreyansh Paliwal
2026-04-03 12:08     ` [PATCH v4 0/3] refs: reduce reliance on global state Shreyansh Paliwal
2026-04-03 12:08       ` [PATCH v4 1/3] refs: add struct repository parameter in get_files_ref_lock_timeout_ms() Shreyansh Paliwal
2026-04-03 17:40         ` Tian Yuchen
2026-04-03 12:08       ` [PATCH v4 2/3] refs: remove the_hash_algo global state Shreyansh Paliwal
2026-04-03 12:09       ` [PATCH v4 3/3] refs/reftable-backend: drop uses of the_repository Shreyansh Paliwal
2026-04-04 13:58       ` [PATCH v5 0/3] refs: reduce reliance on global state Shreyansh Paliwal
2026-04-04 13:58         ` [PATCH v5 1/3] refs: add struct repository parameter in get_files_ref_lock_timeout_ms() Shreyansh Paliwal
2026-04-04 13:58         ` [PATCH v5 2/3] refs: remove the_hash_algo global state Shreyansh Paliwal
2026-04-04 13:58         ` [PATCH v5 3/3] refs/reftable-backend: drop uses of the_repository Shreyansh Paliwal
2026-04-08  8:46         ` [PATCH v5 0/3] refs: reduce reliance on global state Patrick Steinhardt
2026-04-08 17:09           ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox