Provide API access to init_db()
The caller first calls set_git_dir() to specify the GIT_DIR, and then calls init_db() to initialize it. This also cleans up various parts of the code to account for the fact that everything is done with GIT_DIR set, so it's unnecessary to pass the specified directory around. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
19757d80e5
commit
f225aeb278
4
cache.h
4
cache.h
@ -324,6 +324,10 @@ extern const char *prefix_filename(const char *prefix, int len, const char *path
|
||||
extern void verify_filename(const char *prefix, const char *name);
|
||||
extern void verify_non_filename(const char *prefix, const char *name);
|
||||
|
||||
#define INIT_DB_QUIET 0x0001
|
||||
|
||||
extern int init_db(const char *template_dir, unsigned int flags);
|
||||
|
||||
#define alloc_nr(x) (((x)+16)*3/2)
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user