diff options
author | Elijah Newren <newren@gmail.com> | 2023-05-16 06:33:44 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-05-16 08:58:15 -0700 |
commit | 3f85c72fad5b2e67b42c9cd37f0aeba1499dea0d (patch) | |
tree | 65498387042ecb0313efba2d48a7511a61479254 /setup.h | |
parent | 0a76a5fb0288943ad217a2801a1de85229da1758 (diff) | |
download | git-3f85c72fad5b2e67b42c9cd37f0aeba1499dea0d.tar.gz |
setup: adopt shared init-db & clone code
The functions init_db() and initialize_repository_version() were shared
by builtin/init-db.c and builtin/clone.c, and declared in cache.h.
Move these functions, plus their several helpers only used by these
functions, to setup.[ch].
Diff best viewed with `--color-moved`.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.h')
-rw-r--r-- | setup.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -140,6 +140,15 @@ int verify_repository_format(const struct repository_format *format, */ void check_repository_format(struct repository_format *fmt); +#define INIT_DB_QUIET 0x0001 +#define INIT_DB_EXIST_OK 0x0002 + +int init_db(const char *git_dir, const char *real_git_dir, + const char *template_dir, int hash_algo, + const char *initial_branch, int init_shared_repository, + unsigned int flags); +void initialize_repository_version(int hash_algo, int reinit); + /* * NOTE NOTE NOTE!! * |