Commit 283f31ab by Pierre-Olivier Latour Committed by Carlos Martín Nieto

git_branch_delete() should ignore errors from non-existing reflogs

parent aa409d53
......@@ -138,8 +138,13 @@ 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)
if (git_reflog_delete(git_reference_owner(branch), git_reference_name(branch)) < 0) {
if (error == GIT_ENOTFOUND) {
giterr_clear();
error = 0;
}
goto on_error;
}
error = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment