summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-06-04 09:46:28 +0200
committerJunio C Hamano <gitster@pobox.com>2026-06-05 21:49:38 +0900
commit6a2fbab4c95b0fc317514ec7ead618b3b37e3553 (patch)
treeee6416d9704f1c2d20d4e15a697bb1a803f3b69e /commit-graph.c
parent3d884b0b5656fe012002edd6bb8f36a125e6c17e (diff)
repository: stop initializing the object database in `repo_set_gitdir()`
The function `repo_set_gitdir()` obviously sets the Git directory for a given repository. Less obviously though, the function also configures a couple of auxiliary settings. One such thing is that we create the object database in this function. This logic only happens conditionally though, as `set_git_dir()` may be called multiple times during repository setup, and we don't want to create the object database multiple times. This is somewhat tangled and hard to follow. Remove the logic from `repo_set_gitdir()` and instead initialize the object database outside of it. This leads to some duplication right now, but that duplication will be removed in a subsequent step where we will start initializing the object database as part of applying the repo's format. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions