summaryrefslogtreecommitdiffstats
path: root/merge-ort.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2024-03-09 15:09:57 +0100
committerJunio C Hamano <gitster@pobox.com>2024-03-09 18:57:16 +0100
commit25fd20eb44cfcbb0652595de2144f0e077a957ec (patch)
tree352aff7cf8e17b6f9db49bd3b879575d05886974 /merge-ort.c
parentmerge-recursive: prepare for `merge_submodule()` to report errors (diff)
downloadgit-25fd20eb44cfcbb0652595de2144f0e077a957ec.tar.xz
git-25fd20eb44cfcbb0652595de2144f0e077a957ec.zip
merge-ort/merge-recursive: do report errors in `merge_submodule()`
In 24876ebf68b (commit-reach(repo_in_merge_bases_many): report missing commits, 2024-02-28), I taught `merge_submodule()` to handle errors reported by `repo_in_merge_bases_many()`. However, those errors were not passed through to the callers. That was unintentional, and this commit remedies that. Note that `find_first_merges()` can now also return -1 (because it passes through that return value from `repo_in_merge_bases()`), and this commit also adds the forgotten handling for that scenario. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-ort.c')
-rw-r--r--merge-ort.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/merge-ort.c b/merge-ort.c
index 033c4348e2..5d36c04f50 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -1819,6 +1819,7 @@ static int merge_submodule(struct merge_options *opt,
_("Failed to merge submodule %s "
"(repository corrupt)"),
path);
+ ret = -1;
goto cleanup;
}
if (ret2 > 0)
@@ -1829,6 +1830,7 @@ static int merge_submodule(struct merge_options *opt,
_("Failed to merge submodule %s "
"(repository corrupt)"),
path);
+ ret = -1;
goto cleanup;
}
if (!ret2) {
@@ -1848,6 +1850,7 @@ static int merge_submodule(struct merge_options *opt,
_("Failed to merge submodule %s "
"(repository corrupt)"),
path);
+ ret = -1;
goto cleanup;
}
if (ret2 > 0) {
@@ -1866,6 +1869,7 @@ static int merge_submodule(struct merge_options *opt,
_("Failed to merge submodule %s "
"(repository corrupt)"),
path);
+ ret = -1;
goto cleanup;
}
if (ret2 > 0) {
@@ -1899,6 +1903,7 @@ static int merge_submodule(struct merge_options *opt,
_("Failed to merge submodule %s "
"(repository corrupt)"),
path);
+ ret = -1;
break;
case 0:
path_msg(opt, CONFLICT_SUBMODULE_FAILED_TO_MERGE, 0,