summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-07-03 12:07:33 +0200
committernulltoken <emeric.fermas@gmail.com>2012-07-07 12:15:28 +0200
commitb6bfd96fdd0cffc37c843cbf0f7c43efdbe96ef9 (patch)
tree3a2cb2a89e357aef7d293c6e6c57bc0f544f36b2 /src/refs.c
parentb00e9216058e58fd17d27df55cac3b991ad7bd31 (diff)
downloadlibgit2-b6bfd96fdd0cffc37c843cbf0f7c43efdbe96ef9.tar.gz
refs: fix moving of the reflog when renaming a ref
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/refs.c b/src/refs.c
index ee076b3b8..80349b710 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1406,6 +1406,7 @@ int git_reference_rename(git_reference *ref, const char *new_name, int force)
/*
* Rename the reflog file.
*/
+ git_buf_clear(&aux_path);
if (git_buf_join_n(&aux_path, '/', 3, ref->owner->path_repository, GIT_REFLOG_DIR, ref->name) < 0)
goto cleanup;