Skip to content

Commit 00a3da2

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2bee50a commit 00a3da2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

repository.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ struct repository {
8282

8383
extern struct repository *the_repository;
8484

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+
*/
8589
struct set_gitdir_args {
8690
const char *commondir;
8791
const char *object_dir;
@@ -92,7 +96,7 @@ struct set_gitdir_args {
9296

9397
extern void repo_set_gitdir(struct repository *repo,
9498
const char *root,
95-
const struct set_gitdir_args *optional);
99+
const struct set_gitdir_args *extra_args);
96100
extern void repo_set_worktree(struct repository *repo, const char *path);
97101
extern void repo_set_hash_algo(struct repository *repo, int algo);
98102
extern void initialize_the_repository(void);

0 commit comments

Comments
 (0)