setup: allow skipping creation of the refdb
commit56cd0334f7664feffcd8ed8f8f0d3929374c69e0
authorPatrick Steinhardt <ps@pks.im>
Tue, 12 Dec 2023 07:00:46 +0000 (12 08:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Dec 2023 19:16:54 +0000 (12 11:16 -0800)
tree5f206a340a5f9ea9776b4c72a3f1750e9d78295d
parent79543e760d0219063ab21f687e7538c3e89b2e99
setup: allow skipping creation of the refdb

Allow callers to skip creation of the reference database via a new flag
`INIT_DB_SKIP_REFDB`, which is required for git-clone(1) so that we can
create it at a later point once the object format has been discovered
from the remote repository.

Note that we also uplift the call to `create_reference_database()` into
`init_db()`, which makes it easier to handle the new flag for us. This
changes the order in which we do initialization so that we now set up
the Git configuration before we create the reference database. In
practice this move should not result in any change in behaviour.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c
setup.h