diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-03-23 16:55:23 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-23 11:04:52 -0700 |
commit | 00a3da2a131a3e122df7e053d992fbc1735bf4f9 (patch) | |
tree | d71cf6b844105fea7716baa65c6c72f8b2a646bb /repository.h | |
parent | repository: delete ignore_env member (diff) | |
download | tgif-00a3da2a131a3e122df7e053d992fbc1735bf4f9.tar.xz |
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>
Diffstat (limited to 'repository.h')
-rw-r--r-- | repository.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/repository.h b/repository.h index e7127baffb..f21fd93f72 100644 --- a/repository.h +++ b/repository.h @@ -82,6 +82,10 @@ struct repository { extern struct repository *the_repository; +/* + * Define a custom repository layout. Any field can be NULL, which + * will default back to the path according to the default layout. + */ struct set_gitdir_args { const char *commondir; const char *object_dir; @@ -92,7 +96,7 @@ struct set_gitdir_args { extern void repo_set_gitdir(struct repository *repo, const char *root, - const struct set_gitdir_args *optional); + const struct set_gitdir_args *extra_args); extern void repo_set_worktree(struct repository *repo, const char *path); extern void repo_set_hash_algo(struct repository *repo, int algo); extern void initialize_the_repository(void); |