diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-02-27 22:31:43 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-03-03 20:23:50 +0200 |
commit | 87d3acf45eb1a63b5847bca2061a993471b8b1ee (patch) | |
tree | fe1c9ad96065ba92a838f62a3c49ccb91f6425b9 /src/git2/refs.h | |
parent | 17cdf25208202300def293ce1997b97aeb517586 (diff) | |
download | libgit2-87d3acf45eb1a63b5847bca2061a993471b8b1ee.tar.gz |
Finish the References API
The following methods have been implemented:
git_reference_packall
git_reference_rename
git_reference_delete
The library now has full support for packed references, including
partial and total writing. Internal documentation has been updated with
the details.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git2/refs.h')
-rw-r--r-- | src/git2/refs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/git2/refs.h b/src/git2/refs.h index ae77f56f4..752d80862 100644 --- a/src/git2/refs.h +++ b/src/git2/refs.h @@ -187,6 +187,24 @@ GIT_EXTERN(int) git_reference_rename(git_reference *ref, const char *new_name); */ GIT_EXTERN(int) git_reference_delete(git_reference *ref); +/** + * Pack all the loose references in the repository + * + * This method will load into the cache all the loose + * references on the repository and update the + * `packed-refs` file with them. + * + * Once the `packed-refs` file has been written properly, + * the loose references will be removed from disk. + * + * WARNING: calling this method may invalidate any existing + * references previously loaded on the cache. + * + * @param repo Repository where the loose refs will be packed + * @return 0 on success; error code otherwise + */ +GIT_EXTERN(int) git_reference_packall(git_repository *repo); + /** @} */ GIT_END_DECL #endif |