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 /commit.c | |
| parent | The fifth batch (diff) | |
| parent | merge-ort/merge-recursive: do report errors in `merge_submodule()` (diff) | |
| download | git-7745f92507517c4e60dc2a7faad40eee49ee670b.tar.gz git-7745f92507517c4e60dc2a7faad40eee49ee670b.zip | |
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 'commit.c')
| -rw-r--r-- | commit.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1052,7 +1052,7 @@ struct commit *get_fork_point(const char *refname, struct commit *commit) { struct object_id oid; struct rev_collect revs; - struct commit_list *bases; + struct commit_list *bases = NULL; int i; struct commit *ret = NULL; char *full_refname; @@ -1077,8 +1077,9 @@ struct commit *get_fork_point(const char *refname, struct commit *commit) for (i = 0; i < revs.nr; i++) revs.commit[i]->object.flags &= ~TMP_MARK; - bases = repo_get_merge_bases_many(the_repository, commit, revs.nr, - revs.commit); + if (repo_get_merge_bases_many(the_repository, commit, revs.nr, + revs.commit, &bases) < 0) + exit(128); /* * There should be one and only one merge base, when we found |
