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 /builtin/merge-tree.c | |
| parent | commit-reach(get_merge_bases_many_0): pass on "missing commits" errors (diff) | |
| download | git-76e2a0999907644966dfe48b573d6e57e2f1e275.tar.gz git-76e2a0999907644966dfe48b573d6e57e2f1e275.zip | |
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 'builtin/merge-tree.c')
| -rw-r--r-- | builtin/merge-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index 3bdec53fbe..8a460d5529 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -462,8 +462,9 @@ static int real_merge(struct merge_tree_options *o, * Get the merge bases, in reverse order; see comment above * merge_incore_recursive in merge-ort.h */ - merge_bases = repo_get_merge_bases(the_repository, parent1, - parent2); + if (repo_get_merge_bases(the_repository, parent1, + parent2, &merge_bases) < 0) + exit(128); if (!merge_bases && !o->allow_unrelated_histories) die(_("refusing to merge unrelated histories")); merge_bases = reverse_commit_list(merge_bases); |
