diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2024-02-28 09:44:14 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-29 08:06:01 -0800 |
commit | 76e2a0999907644966dfe48b573d6e57e2f1e275 (patch) | |
tree | a39782ae673aff3eade9b30efb619e4fdbbea9c2 /merge-ort.c | |
parent | 8226e157a92066855811188f7ca3fd4bff5f083d (diff) | |
download | git-76e2a0999907644966dfe48b573d6e57e2f1e275.tar.gz |
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>
Diffstat (limited to 'merge-ort.c')
-rw-r--r-- | merge-ort.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/merge-ort.c b/merge-ort.c index 79927954f5..033c4348e2 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -5068,7 +5068,11 @@ static void merge_ort_internal(struct merge_options *opt, struct strbuf merge_base_abbrev = STRBUF_INIT; if (!merge_bases) { - merge_bases = repo_get_merge_bases(the_repository, h1, h2); + if (repo_get_merge_bases(the_repository, h1, h2, + &merge_bases) < 0) { + result->clean = -1; + return; + } /* See merge-ort.h:merge_incore_recursive() declaration NOTE */ merge_bases = reverse_commit_list(merge_bases); } |