From 531738052158fd66bc9b65534309f5c0a9d2808d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 28 Feb 2024 09:44:16 +0000 Subject: commit-reach(repo_get_merge_bases_many): pass on "missing commits" errors The `merge_bases_many()` function was just taught to indicate parsing errors, and now the `repo_get_merge_bases_many()` function is aware of that, too. Naturally, there are a lot of callers that need to be adjusted now, too. Next stop: `repo_get_merge_bases_dirty()`. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- bisect.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bisect.c') diff --git a/bisect.c b/bisect.c index f75e50c339..60aae2fe50 100644 --- a/bisect.c +++ b/bisect.c @@ -836,10 +836,11 @@ static void handle_skipped_merge_base(const struct object_id *mb) static enum bisect_error check_merge_bases(int rev_nr, struct commit **rev, int no_checkout) { enum bisect_error res = BISECT_OK; - struct commit_list *result; + struct commit_list *result = NULL; - result = repo_get_merge_bases_many(the_repository, rev[0], rev_nr - 1, - rev + 1); + if (repo_get_merge_bases_many(the_repository, rev[0], rev_nr - 1, + rev + 1, &result) < 0) + exit(128); for (; result; result = result->next) { const struct object_id *mb = &result->item->object.oid; -- cgit v1.2.3