Skip to content

Commit 43fb0c2

Browse files
authored
Merge pull request libgit2#5444 from josharian/issue5428
repository: improve commondir docs
2 parents 9a10244 + a5886e9 commit 43fb0c2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

include/git2/repository.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,11 @@ GIT_EXTERN(const char *) git_repository_path(const git_repository *repo);
481481
GIT_EXTERN(const char *) git_repository_workdir(const git_repository *repo);
482482

483483
/**
484-
* Get the path of the shared common directory for this repository
485-
*
486-
* If the repository is bare is not a worktree, the git directory
487-
* path is returned.
484+
* Get the path of the shared common directory for this repository.
485+
*
486+
* If the repository is bare, it is the root directory for the repository.
487+
* If the repository is a worktree, it is the parent repo's gitdir.
488+
* Otherwise, it is the gitdir.
488489
*
489490
* @param repo A repository object
490491
* @return the path to the common dir

0 commit comments

Comments
 (0)