]> git.ipfire.org Git - thirdparty/git.git/commitdiff
repository.h: add comment and clarify repo_set_gitdir
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 23 Mar 2018 15:55:23 +0000 (16:55 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Mar 2018 18:04:52 +0000 (11:04 -0700)
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>
repository.h

index e7127baffba019812e458477a34a4d9a80a67cdc..f21fd93f722714617f0b6f2419c25d34a90311de 100644 (file)
@@ -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);