repository.h: add comment and clarify repo_set_gitdir
The argument name "optional" may mislead the reader to think this option could be NULL. But it can't be. While at there, document a bit more about struct set_gitdir_args. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Mar 23, 2018 at 16:55 UTC
00a3da2a131a3e122df7e053d992fbc1735bf4f9
1 file changed
+5
-1
repository.h
+5
-1
@@ -82,6 +82,10 @@ struct repository {
82
83
extern struct repository *the_repository;
84
85
+/*
86
+ * Define a custom repository layout. Any field can be NULL, which
87
+ * will default back to the path according to the default layout.
88
+ */
89
struct set_gitdir_args {
90
const char *commondir;
91
const char *object_dir;
@@ -92,7 +96,7 @@ struct set_gitdir_args {
96
97
extern void repo_set_gitdir(struct repository *repo,
98
const char *root,
95
- const struct set_gitdir_args *optional);
99
+ const struct set_gitdir_args *extra_args);
100
extern void repo_set_worktree(struct repository *repo, const char *path);
101
extern void repo_set_hash_algo(struct repository *repo, int algo);
102
extern void initialize_the_repository(void);