Set error when no merge base is found
diff --git a/src/merge.c b/src/merge.c
index e0010d6..48ff80c 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -86,6 +86,7 @@ int git_merge_base_many(git_oid *out, git_repository *repo, const git_oid input_
goto cleanup;
if (!result) {
+ giterr_set(GITERR_MERGE, "No merge base found");
error = GIT_ENOTFOUND;
goto cleanup;
}
@@ -131,7 +132,7 @@ int git_merge_base(git_oid *out, git_repository *repo, const git_oid *one, const
if (!result) {
git_revwalk_free(walk);
- giterr_clear();
+ giterr_set(GITERR_MERGE, "No merge base found");
return GIT_ENOTFOUND;
}