mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-26 03:42:28 +00:00
Merge pull request #2937 from git-up/branch_delete_reflog
git_branch_delete() should ignore errors from non-existing reflogs
This commit is contained in:
commit
5ac2b7cb2a
@ -138,8 +138,13 @@ int git_branch_delete(git_reference *branch)
|
|||||||
if (git_reference_delete(branch) < 0)
|
if (git_reference_delete(branch) < 0)
|
||||||
goto on_error;
|
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;
|
goto on_error;
|
||||||
|
}
|
||||||
|
|
||||||
error = 0;
|
error = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user