Commit de19c4a9 by Russell Belfer

Set error when no merge base is found

parent e830c020
...@@ -86,6 +86,7 @@ int git_merge_base_many(git_oid *out, git_repository *repo, const git_oid input_ ...@@ -86,6 +86,7 @@ int git_merge_base_many(git_oid *out, git_repository *repo, const git_oid input_
goto cleanup; goto cleanup;
if (!result) { if (!result) {
giterr_set(GITERR_MERGE, "No merge base found");
error = GIT_ENOTFOUND; error = GIT_ENOTFOUND;
goto cleanup; goto cleanup;
} }
...@@ -131,7 +132,7 @@ int git_merge_base(git_oid *out, git_repository *repo, const git_oid *one, const ...@@ -131,7 +132,7 @@ int git_merge_base(git_oid *out, git_repository *repo, const git_oid *one, const
if (!result) { if (!result) {
git_revwalk_free(walk); git_revwalk_free(walk);
giterr_clear(); giterr_set(GITERR_MERGE, "No merge base found");
return GIT_ENOTFOUND; return GIT_ENOTFOUND;
} }
......
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