diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-06-04 09:46:29 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-06-05 21:49:38 +0900 |
| commit | aae4ebc895272dc7e5a9ccfc135878b55c7322d7 (patch) | |
| tree | 5449eea7704fb8719ab66f07947fd04157433004 /commit-graph.c | |
| parent | 6a2fbab4c95b0fc317514ec7ead618b3b37e3553 (diff) | |
setup: stop creating the object database in `setup_git_env()`
In the preceding commit we have stopped creating the object database in
`repo_set_gitdir()`. But the logic is still somewhat confusing as we
still end up creating it conditionally in `setup_git_dir()`, which is
called multiple times.
Drop the conditional logic and instead create the object database in all
places where we have discovered and configured a repository.
This leads to even more duplication than we already had in the preceding
commit, but an alert reader may notice that we now (almost) always call
`odb_new()` directly before having called `apply_repository_format()`.
The only exception to this is `setup_git_directory_gently()`, where we
also call the function when _not_ applying the repository format. This
will be fixed in the next commit, and once that's done we can then unify
creation of the object database into `apply_repository_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
