diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-03-11 14:12:30 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-03-11 14:12:30 -0700 |
| commit | 7745f92507517c4e60dc2a7faad40eee49ee670b (patch) | |
| tree | f9eb30d1767f40a69db6b874f50bbdc8953d745d /log-tree.c | |
| parent | e09f1254c54329773904fe25d7c545a1fb4fa920 (diff) | |
| parent | 25fd20eb44cfcbb0652595de2144f0e077a957ec (diff) | |
| download | git-7745f92507517c4e60dc2a7faad40eee49ee670b.tar.xz | |
Merge branch 'js/merge-base-with-missing-commit'
Make sure failure return from merge_bases_many() is properly caught.
* js/merge-base-with-missing-commit:
merge-ort/merge-recursive: do report errors in `merge_submodule()`
merge-recursive: prepare for `merge_submodule()` to report errors
commit-reach(repo_get_merge_bases_many_dirty): pass on errors
commit-reach(repo_get_merge_bases_many): pass on "missing commits" errors
commit-reach(get_octopus_merge_bases): pass on "missing commits" errors
commit-reach(repo_get_merge_bases): pass on "missing commits" errors
commit-reach(get_merge_bases_many_0): pass on "missing commits" errors
commit-reach(merge_bases_many): pass on "missing commits" errors
commit-reach(paint_down_to_common): start reporting errors
commit-reach(paint_down_to_common): prepare for handling shallow commits
commit-reach(repo_in_merge_bases_many): report missing commits
commit-reach(repo_in_merge_bases_many): optionally expect missing commits
commit-reach(paint_down_to_common): plug two memory leaks
Diffstat (limited to 'log-tree.c')
| -rw-r--r-- | log-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c index 337b9334cd..e5438b029d 100644 --- a/log-tree.c +++ b/log-tree.c @@ -1011,7 +1011,7 @@ static int do_remerge_diff(struct rev_info *opt, struct object_id *oid) { struct merge_options o; - struct commit_list *bases; + struct commit_list *bases = NULL; struct merge_result res = {0}; struct pretty_print_context ctx = {0}; struct commit *parent1 = parents->item; @@ -1036,7 +1036,8 @@ static int do_remerge_diff(struct rev_info *opt, /* Parse the relevant commits and get the merge bases */ parse_commit_or_die(parent1); parse_commit_or_die(parent2); - bases = repo_get_merge_bases(the_repository, parent1, parent2); + if (repo_get_merge_bases(the_repository, parent1, parent2, &bases) < 0) + exit(128); /* Re-merge the parents */ merge_incore_recursive(&o, bases, parent1, parent2, &res); |
