summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2014-01-28 10:31:54 -0800
committerBen Straub <bs@github.com>2014-01-30 15:52:13 -0800
commit48110f67e4a21caac1b8157d8239d16cd9781e51 (patch)
treec4f5622e70fe4fc88a6400468e56eee7afa0d033 /src
parent1cc974ab625c2fa0794130eb97ca88c449fc1a06 (diff)
downloadlibgit2-48110f67e4a21caac1b8157d8239d16cd9781e51.tar.gz
Deleting a branch deletes its reflog
Diffstat (limited to 'src')
-rw-r--r--src/branch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/branch.c b/src/branch.c
index a989cb61d..531101f8a 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -111,6 +111,9 @@ int git_branch_delete(git_reference *branch)
if (git_reference_delete(branch) < 0)
goto on_error;
+ if (git_reflog_delete(git_reference_owner(branch), git_reference_name(branch)) < 0)
+ goto on_error;
+
error = 0;
on_error: