Commit 43fb0c2925668ed092bb37f7949b816973b6fbce

Edward Thomson 2020-03-23T10:20:46

Merge pull request #5444 from josharian/issue5428 repository: improve commondir docs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 45d7962..9ddcd34 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -481,10 +481,11 @@ GIT_EXTERN(const char *) git_repository_path(const git_repository *repo);
 GIT_EXTERN(const char *) git_repository_workdir(const git_repository *repo);
 
 /**
- * Get the path of the shared common directory for this repository
- *
- * If the repository is bare is not a worktree, the git directory
- * path is returned.
+ * Get the path of the shared common directory for this repository.
+ * 
+ * If the repository is bare, it is the root directory for the repository.
+ * If the repository is a worktree, it is the parent repo's gitdir.
+ * Otherwise, it is the gitdir.
  *
  * @param repo A repository object
  * @return the path to the common dir