merge-ort: remove command-line-centric submodule message from merge-ort
There was one case in merge-ort that would call path_msg() multiple times for the same logical conflict, and it was in order to give advice about how to resolve a conflict. This advice does not make as much sense with remerge-diff, or with merge-tree being invoked by a GitHub GUI for resolution of messages, and is making it hard to provide which-logical-conflict-affects-which-paths information in a machine parseable way to a higher level caller of merge-tree. Let's simply remove this informational message. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Jun 18, 2022 at 00:20 UTC
a4040cfa35d8781df3e994380d1b559be8b22bd2
2 files changed
+2
-9
merge-ort.c
+1
-8
@@ -1694,15 +1694,8 @@ static int merge_submodule(struct merge_options *opt,
1694
(struct commit *)merges.objects[0].item);
1695
path_msg(opt, path, 0,
1696
_("Failed to merge submodule %s, but a possible merge "
1697
- "resolution exists:\n%s\n"),
1697
+ "resolution exists: %s"),
1698
path, sb.buf);
1699
- path_msg(opt, path, 1,
1700
- _("If this is correct simply add it to the index "
1701
- "for example\n"
1702
- "by using:\n\n"
1703
- " git update-index --cacheinfo 160000 %s \"%s\"\n\n"
1704
- "which will accept this suggestion.\n"),
1705
- oid_to_hex(&merges.objects[0].item->oid), path);
1699
strbuf_release(&sb);
1700
break;
1701
default:
t/t6437-submodule-merge.sh
+1
-1
@@ -133,7 +133,7 @@ test_expect_success 'merging should conflict for non fast-forward' '
133
(cd merge-search &&
134
git checkout -b test-nonforward b &&
135
(cd sub &&
136
- git rev-parse sub-d > ../expect) &&
136
+ git rev-parse --short sub-d > ../expect) &&
137
if test "$GIT_TEST_MERGE_ALGORITHM" = ort
138
then
139
test_must_fail git merge c >actual