aboutsummaryrefslogtreecommitdiffstats
path: root/chdir-notify.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-11-19 08:50:58 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-25 12:16:00 -0800
commit35d9fc65edc0a5df9f714d02afaa2c942fb28570 (patch)
treee468c9ab58a7c7c403b3c48ccd879effa9c3f43e /chdir-notify.c
parentc257bd59165e2f55dfa2c97b0ca1e39131513654 (diff)
downloadgit-35d9fc65edc0a5df9f714d02afaa2c942fb28570.tar.gz
odb: handle initialization of sources in `odb_new()`
The logic to set up a new object database is currently distributed across two functions in "repository.c": - In `initialize_repository()` we initialize an empty object database. This object database is not fully initialized and doesn't have any sources attached to it. - The primary object database source is then created in `repo_set_gitdir()`. Ideally though, the logic should be entirely self-contained so that we can iterate more readily on how exactly the sources themselves get set up. Refactor `odb_new()` to handle both allocation and setup of the object database. This ensures that the object database is always initialized and ready for use, and it allows us to change how the sources get set up eventually. Note that `repo_set_gitdir()` still reaches into the sources when the function gets called with an already-initialized object database. This will be fixed in the next commit. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'chdir-notify.c')
0 files changed, 0 insertions, 0 deletions