diff options
author | Carlos Martín Nieto <cmn@elego.de> | 2012-07-21 16:24:13 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@elego.de> | 2012-07-21 16:24:13 +0200 |
commit | 6782245e51af13427cce7eb4dd4d3a4f202c9150 (patch) | |
tree | 4e66353bbd2a431b1e2219ae84e3341abfad5ed8 /include/git2/repository.h | |
parent | 507523c32f71056a106f85712fe2086fdb94fbd0 (diff) | |
download | libgit2-6782245e51af13427cce7eb4dd4d3a4f202c9150.tar.gz |
repo: add git_repository_wrap_odb() to wrap an ODB
Primarily useful when used together with git_odb_backend_one_pack().
Diffstat (limited to 'include/git2/repository.h')
-rw-r--r-- | include/git2/repository.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h index ff81b75ec..ef2f5413d 100644 --- a/include/git2/repository.h +++ b/include/git2/repository.h @@ -36,6 +36,19 @@ GIT_BEGIN_DECL GIT_EXTERN(int) git_repository_open(git_repository **repository, const char *path); /** + * Create a "fake" repository to wrap an object database + * + * Create a repository object to wrap an object database to be used + * with the API when all you have is an object database. This doesn't + * have any paths associated with it, so use with care. + * + * @param repository pointer to the repo + * @param odb the object database to wrap + * @return 0 or an error code + */ +GIT_EXTERN(int) git_repository_wrap_odb(git_repository **repository, git_odb *odb); + +/** * Look for a git repository and copy its path in the given buffer. * The lookup start from base_path and walk across parent directories * if nothing has been found. The lookup ends when the first repository |