Skip to content

Commit a5886e9

Browse files
committed
repository: improve commondir docs
Fixes libgit2#5428
1 parent e23b8b4 commit a5886e9

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)