diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-03-03 14:35:54 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-05 22:14:03 +0300 |
commit | b2f0eceecf266e60fa95970e0973a8f23f911fb1 (patch) | |
tree | ca03c9b0c360f210b0005112c2b01278c7b9c0a7 /repository.h | |
parent | b2e45c695d09f6a31ce09347ae0a5d2cdfe9dd4e (diff) |
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>
Diffstat (limited to 'repository.h')
-rw-r--r-- | repository.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/repository.h b/repository.h index 0329e40c7f..40c1c81bdc 100644 --- a/repository.h +++ b/repository.h @@ -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); |