Commit 7c9bf891 by Edward Thomson

repository_head_unborn: clear error when HEAD is unborn

parent ca7cd173
......@@ -1567,8 +1567,10 @@ int git_repository_head_unborn(git_repository *repo)
error = git_repository_head(&ref, repo);
git_reference_free(ref);
if (error == GIT_EUNBORNBRANCH)
if (error == GIT_EUNBORNBRANCH) {
giterr_clear();
return 1;
}
if (error < 0)
return -1;
......
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