init-db: move writing repo version into a function
When we perform a clone, we won't know the remote side's hash algorithm until we've read the heads. Consequently, we'll need to rewrite the repository format version and hash algorithm once we know what the remote side has. Move the code that does this into its own function so that we can call it from clone in the future. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3c9331a129
commit
efa7ae36c1
1
cache.h
1
cache.h
@ -629,6 +629,7 @@ int path_inside_repo(const char *prefix, const char *path);
|
||||
int init_db(const char *git_dir, const char *real_git_dir,
|
||||
const char *template_dir, int hash_algo,
|
||||
unsigned int flags);
|
||||
void initialize_repository_version(int hash_algo);
|
||||
|
||||
void sanitize_stdfds(void);
|
||||
int daemonize(void);
|
||||
|
Reference in New Issue
Block a user