summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
diff options
context:
space:
mode:
authorschu <schu-github@schulog.org>2011-11-21 11:56:00 +0100
committerschu <schu-github@schulog.org>2011-11-21 16:38:30 +0100
commita5cd086dffbc07ad839f3a9c320dda6970594126 (patch)
treee0a18df76f3ecc8b3cf1b36ac2fce12dc5a9a87a /include/git2/refs.h
parentb7c93a66e2410298fe846b9ed18a70b4d0ace45e (diff)
downloadlibgit2-a5cd086dffbc07ad839f3a9c320dda6970594126.tar.gz
reference_rename: don't delete the reflog
reference_rename used to delete an old reflog file when renaming a reference to not confuse git.git. Don't do this anymore but let the user take care of writing a reflog entry. Signed-off-by: schu <schu-github@schulog.org>
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r--include/git2/refs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 82c5d8881..32671aa66 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -183,6 +183,11 @@ GIT_EXTERN(int) git_reference_set_oid(git_reference *ref, const git_oid *id);
* If the `force` flag is not enabled, and there's already
* a reference with the given name, the renaming will fail.
*
+ * IMPORTANT:
+ * The user needs to write a proper reflog entry if the
+ * reflog is enabled for the repository. We only rename
+ * the reflog if it exists.
+ *
* @param ref The reference to rename
* @param new_name The new name for the reference
* @param force Overwrite an existing reference