mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-11 14:07:49 +00:00
repository_head_unborn: clear error when HEAD is unborn
This commit is contained in:
parent
ca7cd1734d
commit
7c9bf891d5
@ -1567,8 +1567,10 @@ int git_repository_head_unborn(git_repository *repo)
|
|||||||
error = git_repository_head(&ref, repo);
|
error = git_repository_head(&ref, repo);
|
||||||
git_reference_free(ref);
|
git_reference_free(ref);
|
||||||
|
|
||||||
if (error == GIT_EUNBORNBRANCH)
|
if (error == GIT_EUNBORNBRANCH) {
|
||||||
|
giterr_clear();
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user