repository: initialize the_repository in main()
This simplifies initialization of struct repository and anything inside. Easier to read. Easier to add/remove fields. Everything will go through main() common-main.c so this should cover all programs, including t/helper. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b2e45c695d
commit
b2f0eceecf
@ -91,7 +91,7 @@ extern struct repository *the_repository;
|
||||
extern void repo_set_gitdir(struct repository *repo, const char *path);
|
||||
extern void repo_set_worktree(struct repository *repo, const char *path);
|
||||
extern void repo_set_hash_algo(struct repository *repo, int algo);
|
||||
extern int repo_init(struct repository *repo, const char *gitdir, const char *worktree);
|
||||
extern void initialize_the_repository(void);
|
||||
extern int repo_submodule_init(struct repository *submodule,
|
||||
struct repository *superproject,
|
||||
const char *path);
|
||||
|
Reference in New Issue
Block a user