commit-reach(repo_get_merge_bases): pass on "missing commits" errors
The `merge_bases_many()` function was just taught to indicate parsing errors, and now the `repo_get_merge_bases()` function (which is also surfaced via the `repo_get_merge_bases()` macro) is aware of that, too. Naturally, there are a lot of callers that need to be adjusted now, too. Next step: adjust the callers of `get_octopus_merge_bases()`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
8226e157a9
commit
76e2a09999
@ -1479,7 +1479,7 @@ int repo_get_oid_mb(struct repository *r,
|
||||
struct object_id *oid)
|
||||
{
|
||||
struct commit *one, *two;
|
||||
struct commit_list *mbs;
|
||||
struct commit_list *mbs = NULL;
|
||||
struct object_id oid_tmp;
|
||||
const char *dots;
|
||||
int st;
|
||||
@ -1507,7 +1507,10 @@ int repo_get_oid_mb(struct repository *r,
|
||||
two = lookup_commit_reference_gently(r, &oid_tmp, 0);
|
||||
if (!two)
|
||||
return -1;
|
||||
mbs = repo_get_merge_bases(r, one, two);
|
||||
if (repo_get_merge_bases(r, one, two, &mbs) < 0) {
|
||||
free_commit_list(mbs);
|
||||
return -1;
|
||||
}
|
||||
if (!mbs || mbs->next)
|
||||
st = -1;
|
||||
else {
|
||||
|
Reference in New Issue
Block a user