]> git.ipfire.org Git - thirdparty/git.git/commit - setup.c
refs: prepare `refs_init_db()` for initializing worktree refs
authorPatrick Steinhardt <ps@pks.im>
Mon, 8 Jan 2024 10:05:26 +0000 (11:05 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Jan 2024 21:17:30 +0000 (13:17 -0800)
commit2e573d61ffe3d1e7ea94673757fb69477c1499bc
tree7710c1b5c414633ef1984f0cac1b2313d3c3b164
parent5bf20d6c77500f3ad95451421725ee2122ef5610
refs: prepare `refs_init_db()` for initializing worktree refs

The purpose of `refs_init_db()` is to initialize the on-disk files of a
new ref database. The function is quite inflexible right now though, as
callers can neither specify the `struct ref_store` nor can they pass any
flags.

Refactor the interface to accept both of these. This will be required so
that we can start initializing per-worktree ref databases via the ref
backend instead of open-coding the initialization in "worktree.c".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs.h
refs/debug.c
refs/files-backend.c
refs/packed-backend.c
refs/refs-internal.h
setup.c