diff options
| author | Vicent Marti <tanoku@gmail.com> | 2013-05-30 03:47:10 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2013-05-30 03:47:10 +0200 |
| commit | 4e6e2ff26f5a04a4628aa0d81e5d5d73acf28ec4 (patch) | |
| tree | 9a6d20bb0d7e8b390bbb0a5b0a67a493ea778fd6 /include/git2 | |
| parent | ec24e542969f9d49e41e4c2cb3eac2259b1818c2 (diff) | |
| download | libgit2-4e6e2ff26f5a04a4628aa0d81e5d5d73acf28ec4.tar.gz | |
...Aaaand this works
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/refs.h | 7 | ||||
| -rw-r--r-- | include/git2/sys/refdb_backend.h | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index 44b658d5b..cec830653 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -257,11 +257,6 @@ GIT_EXTERN(int) git_reference_set_target( * The new name will be checked for validity. * See `git_reference_create_symbolic()` for rules about valid names. * - * On success, the given git_reference will be deleted from disk and a - * new `git_reference` will be returned. - * - * The reference will be immediately renamed in-memory and on disk. - * * If the `force` flag is not enabled, and there's already * a reference with the given name, the renaming will fail. * @@ -277,7 +272,7 @@ GIT_EXTERN(int) git_reference_set_target( * */ GIT_EXTERN(int) git_reference_rename( - git_reference **out, + git_reference **new_ref, git_reference *ref, const char *new_name, int force); diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h index a78d22658..9b457b074 100644 --- a/include/git2/sys/refdb_backend.h +++ b/include/git2/sys/refdb_backend.h @@ -92,13 +92,18 @@ struct git_refdb_backend { * Writes the given reference to the refdb. A refdb implementation * must provide this function. */ - int (*write)(git_refdb_backend *backend, const git_reference *ref); + int (*write)(git_refdb_backend *backend, + const git_reference *ref, int force); + + int (*rename)( + git_reference **out, git_refdb_backend *backend, + const char *old_name, const char *new_name, int force); /** * Deletes the given reference from the refdb. A refdb implementation * must provide this function. */ - int (*delete)(git_refdb_backend *backend, const git_reference *ref); + int (*delete)(git_refdb_backend *backend, const char *ref_name); /** * Suggests that the given refdb compress or optimize its references. |
