Git development
 help / color / mirror / Atom feed
* [PATCH 0/8] setup: centralize object database creation
@ 2026-05-21  7:42 Patrick Steinhardt
  2026-05-21  7:42 ` [PATCH 1/8] t0001: plug test gaps for git-init(1) with GIT_OBJECT_DIRECTORY Patrick Steinhardt
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Patrick Steinhardt @ 2026-05-21  7:42 UTC (permalink / raw)
  To: git

Hi,

this small patch series refactors the logic for how we discover and
configure repositories. Most importantly, this involves the following
two steps:

  1. We unify the logic to apply the repository format, which is
     currently open-coded across multiple sites. These sites have
     already diverged, where some repository extensions are not
     consistently applied.

  2. We then centralize creation of the object database to happen at the
     same time we apply the repository format.

The end result is that we apply the repository format exactly once, and
that's also the point in time where we can finalize the setup of the
repo's data structures as we know about all details of the repo at that
time. Ultimately, this makes it trivial to introduce the "objectStorage"
extension, even though that's not part of this patch series.

The series is built on top of aec3f58750 (Sync with 'maint', 2026-05-21)
with ps/setup-wo-the-repository at df69f40c34 (setup: stop using
`the_repository` in `init_db()`, 2026-05-19) merged into it.

Thanks!

Patrick

---
Patrick Steinhardt (8):
      t0001: plug test gaps for git-init(1) with GIT_OBJECT_DIRECTORY
      setup: drop `setup_git_env()`
      setup: deduplicate logic to apply repository format
      repository: stop initializing the object database in `repo_set_gitdir()`
      setup: stop creating the object database in `setup_git_env()`
      setup: stop initializing object database without repository
      repository: stop reading loose object map twice on repo init
      setup: construct object database in `apply_repository_format()`

 commit-graph.c  |   4 +-
 environment.h   |   8 +---
 refs.c          |   3 +-
 repository.c    |  40 +++++------------
 repository.h    |   3 --
 setup.c         | 130 +++++++++++++++++++++++++++++++-------------------------
 setup.h         |  19 +++++++++
 t/t0001-init.sh |  10 +++++
 8 files changed, 117 insertions(+), 100 deletions(-)


---
base-commit: 3398daa441965513c48744305d33bd36404547d6
change-id: 20260519-b4-pks-setup-centralize-odb-creation-3479c53fb11d


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

end of thread, other threads:[~2026-05-21 17:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21  7:42 [PATCH 0/8] setup: centralize object database creation Patrick Steinhardt
2026-05-21  7:42 ` [PATCH 1/8] t0001: plug test gaps for git-init(1) with GIT_OBJECT_DIRECTORY Patrick Steinhardt
2026-05-21 16:49   ` Junio C Hamano
2026-05-21 17:51   ` Kristoffer Haugsbakk
2026-05-21  7:42 ` [PATCH 2/8] setup: drop `setup_git_env()` Patrick Steinhardt
2026-05-21  7:42 ` [PATCH 3/8] setup: deduplicate logic to apply repository format Patrick Steinhardt
2026-05-21  7:42 ` [PATCH 4/8] repository: stop initializing the object database in `repo_set_gitdir()` Patrick Steinhardt
2026-05-21  7:42 ` [PATCH 5/8] setup: stop creating the object database in `setup_git_env()` Patrick Steinhardt
2026-05-21  7:42 ` [PATCH 6/8] setup: stop initializing object database without repository Patrick Steinhardt
2026-05-21  7:42 ` [PATCH 7/8] repository: stop reading loose object map twice on repo init Patrick Steinhardt
2026-05-21  7:42 ` [PATCH 8/8] setup: construct object database in `apply_repository_format()` Patrick Steinhardt
2026-05-21 17:59   ` 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