mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-07 00:24:22 +00:00
branch: do capture the error code
We want to ignore GIT_ENOTFOUND, but for that we need to capture the error code from the reflog deletion.
This commit is contained in:
parent
5ac2b7cb2a
commit
31bc6c0440
@ -138,7 +138,7 @@ 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 ((error = git_reflog_delete(git_reference_owner(branch), git_reference_name(branch))) < 0) {
|
||||
if (error == GIT_ENOTFOUND) {
|
||||
giterr_clear();
|
||||
error = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user