diff options
| author | Etienne Samson <samson.etienne@gmail.com> | 2019-06-26 14:49:50 +0200 |
|---|---|---|
| committer | Etienne Samson <samson.etienne@gmail.com> | 2019-06-26 14:49:50 +0200 |
| commit | 501c51b2446b229655638ea6ad003fdc88b77760 (patch) | |
| tree | 3c37a4431f9f3d5a8ea98a00e6171544038e65b1 /include/git2/sys | |
| parent | 9f723c97f506da0e544efe1910a96afd311f3407 (diff) | |
| download | libgit2-501c51b2446b229655638ea6ad003fdc88b77760.tar.gz | |
repo: commondir resolution can sometimes fallback to the repodir
For example, https://git-scm.com/docs/gitrepository-layout says:
info
Additional information about the repository is recorded in this directory.
This directory is ignored if $GIT_COMMON_DIR is set
and "$GIT_COMMON_DIR/info" will be used instead.
So when looking for `info/attributes`, we need to check the commondir first,
or fallback to "our" `info/attributes`.
Diffstat (limited to 'include/git2/sys')
| -rw-r--r-- | include/git2/sys/repository.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/git2/sys/repository.h b/include/git2/sys/repository.h index f1d1c3d06..ea2773fd8 100644 --- a/include/git2/sys/repository.h +++ b/include/git2/sys/repository.h @@ -25,6 +25,10 @@ GIT_BEGIN_DECL * Note that this is only useful if you wish to associate the repository * with a non-filesystem-backed object database and config store. * + * Caveats: since this repository has no physical location, some systems + * can fail to function properly: locations under $GIT_DIR, $GIT_COMMON_DIR, + * or $GIT_INFO_DIR are impacted. + * * @param out The blank repository * @return 0 on success, or an error code */ |
