diff options
Diffstat (limited to 'setup.h')
-rw-r--r-- | setup.h | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -1,6 +1,7 @@ #ifndef SETUP_H #define SETUP_H +#include "refs.h" #include "string-list.h" int is_inside_git_dir(void); @@ -93,6 +94,9 @@ static inline int discover_git_directory(struct strbuf *commondir, return 0; } +void set_git_dir(const char *path, int make_realpath); +void set_git_work_tree(const char *tree); + const char *setup_git_directory_gently(int *); const char *setup_git_directory(void); char *prefix_path(const char *prefix, int len, const char *path); @@ -127,6 +131,8 @@ struct repository_format { int worktree_config; int is_bare; int hash_algo; + int compat_hash_algo; + enum ref_storage_format ref_storage_format; int sparse_index; char *work_tree; struct string_list unknown_extensions; @@ -143,6 +149,7 @@ struct repository_format { .version = -1, \ .is_bare = -1, \ .hash_algo = GIT_HASH_SHA1, \ + .ref_storage_format = REF_STORAGE_FORMAT_FILES, \ .unknown_extensions = STRING_LIST_INIT_DUP, \ .v1_only_extensions = STRING_LIST_INIT_DUP, \ } @@ -172,7 +179,7 @@ int verify_repository_format(const struct repository_format *format, struct strbuf *err); /* - * Check the repository format version in the path found in get_git_dir(), + * Check the repository format version in the path found in repo_get_git_dir(the_repository), * and die if it is a version we don't understand. Generally one would * set_git_dir() before calling this, and use it only for "are we in a valid * repo?". @@ -183,14 +190,20 @@ void check_repository_format(struct repository_format *fmt); const char *get_template_dir(const char *option_template); -#define INIT_DB_QUIET 0x0001 -#define INIT_DB_EXIST_OK 0x0002 +#define INIT_DB_QUIET (1 << 0) +#define INIT_DB_EXIST_OK (1 << 1) +#define INIT_DB_SKIP_REFDB (1 << 2) int init_db(const char *git_dir, const char *real_git_dir, const char *template_dir, int hash_algo, + enum ref_storage_format ref_storage_format, const char *initial_branch, int init_shared_repository, unsigned int flags); -void initialize_repository_version(int hash_algo, int reinit); +void initialize_repository_version(int hash_algo, + enum ref_storage_format ref_storage_format, + int reinit); +void create_reference_database(enum ref_storage_format ref_storage_format, + const char *initial_branch, int quiet); /* * NOTE NOTE NOTE!! |