Commit d055f4ea by Edward Thomson

repository_head_unborn: clear error when HEAD is unborn

parent 5757c020
...@@ -1551,8 +1551,10 @@ int git_repository_head_unborn(git_repository *repo) ...@@ -1551,8 +1551,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;
......
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