{"thread":{"id":"60806","subject":"[PATCH] merge-ort: turn submodule conflict suggestions into an advice","startedAt":"2024-01-29T13:29:31Z","lastAt":"2024-02-26T18:34:05Z","messageCount":5,"participants":["Philippe Blain via GitGitGadget","Junio C Hamano","Philippe Blain"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"487524","messageId":"pull.1661.git.git.1706534968589.gitgitgadget@gmail.com","threadId":"60806","inReplyTo":null,"subject":"[PATCH] merge-ort: turn submodule conflict suggestions into an advice","fromName":"Philippe Blain via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-01-29T13:29:28Z","receivedAt":"2024-01-29T13:29:31Z","isPatch":true,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"From: Philippe Blain <levraiphilippeblain@gmail.com>\n\nAdd a new advice type 'submoduleMergeConflict' for the error message\nshown when a non-trivial submodule conflict is encountered, which was\nadded in 4057523a40 (submodule merge: update conflict error message,\n2022-08-04). That commit mentions making this message an advice as\npossible future work.\n\nUpdate the tests as the expected message now appears on stderr instead\nof stdout.\n\nSigned-off-by: Philippe Blain <levraiphilippeblain@gmail.com>\n---\n    merge-ort: turn submodule conflict suggestions into an advice\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1661%2Fphil-blain%2Fmerge-submodule-conflict-advice-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1661/phil-blain/merge-submodule-conflict-advice-v1\nPull-Request: https://github.com/git/git/pull/1661\n\n Documentation/config/advice.txt |  3 +++\n advice.c                        |  1 +\n advice.h                        |  1 +\n merge-ort.c                     |  3 ++-\n t/t6437-submodule-merge.sh      | 14 +++++++-------\n t/t7402-submodule-rebase.sh     |  2 +-\n 6 files changed, 15 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt\nindex 25c09175244..32701b96828 100644\n--- a/Documentation/config/advice.txt\n+++ b/Documentation/config/advice.txt\n@@ -128,6 +128,9 @@ advice.*::\n \tsubmoduleAlternateErrorStrategyDie::\n \t\tAdvice shown when a submodule.alternateErrorStrategy option\n \t\tconfigured to \"die\" causes a fatal error.\n+\tsubmoduleMergeConflict::\n+\t\tAdvice shown when a non-trivial submodule merge conflict is\n+\t\tencountered.\n \tsubmodulesNotUpdated::\n \t\tAdvice shown when a user runs a submodule command that fails\n \t\tbecause `git submodule update --init` was not run.\ndiff --git a/advice.c b/advice.c\nindex f6e4c2f302e..eee27b5bebc 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -73,6 +73,7 @@ static struct {\n \t[ADVICE_STATUS_U_OPTION]\t\t\t= { \"statusUoption\", 1 },\n \t[ADVICE_SUBMODULES_NOT_UPDATED] \t\t= { \"submodulesNotUpdated\", 1 },\n \t[ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE] = { \"submoduleAlternateErrorStrategyDie\", 1 },\n+\t[ADVICE_SUBMODULE_MERGE_CONFLICT]               = { \"submoduleMergeConflict\", 1  },\n \t[ADVICE_SUGGEST_DETACHING_HEAD]\t\t\t= { \"suggestDetachingHead\", 1 },\n \t[ADVICE_UPDATE_SPARSE_PATH]\t\t\t= { \"updateSparsePath\", 1 },\n \t[ADVICE_WAITING_FOR_EDITOR]\t\t\t= { \"waitingForEditor\", 1 },\ndiff --git a/advice.h b/advice.h\nindex 9d4f49ae38b..7d0a821f5cb 100644\n--- a/advice.h\n+++ b/advice.h\n@@ -47,6 +47,7 @@ enum advice_type {\n \tADVICE_STATUS_U_OPTION,\n \tADVICE_SUBMODULES_NOT_UPDATED,\n \tADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE,\n+\tADVICE_SUBMODULE_MERGE_CONFLICT,\n \tADVICE_SUGGEST_DETACHING_HEAD,\n \tADVICE_UPDATE_SPARSE_PATH,\n \tADVICE_WAITING_FOR_EDITOR,\ndiff --git a/merge-ort.c b/merge-ort.c\nindex 77ba7f3020c..59f025db26f 100644\n--- a/merge-ort.c\n+++ b/merge-ort.c\n@@ -18,6 +18,7 @@\n #include \"merge-ort.h\"\n \n #include \"alloc.h\"\n+#include \"advice.h\"\n #include \"attr.h\"\n #include \"cache-tree.h\"\n #include \"commit.h\"\n@@ -4555,7 +4556,7 @@ static void print_submodule_conflict_suggestion(struct string_list *csub) {\n \t\t      \" - commit the resulting index in the superproject\\n\"),\n \t\t    tmp.buf, subs.buf);\n \n-\tprintf(\"%s\", msg.buf);\n+\tadvise_if_enabled(ADVICE_SUBMODULE_MERGE_CONFLICT, \"%s\", msg.buf);\n \n \tstrbuf_release(&subs);\n \tstrbuf_release(&tmp);\ndiff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh\nindex 70650521b04..7a3f1cb27c1 100755\n--- a/t/t6437-submodule-merge.sh\n+++ b/t/t6437-submodule-merge.sh\n@@ -113,7 +113,7 @@ test_expect_success 'merging should conflict for non fast-forward' '\n \t git checkout -b test-nonforward-a b &&\n \t  if test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \t  then\n-\t\ttest_must_fail git merge c >actual &&\n+\t\ttest_must_fail git merge c 2>actual &&\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)\" &&\n \t\tgrep \"$sub_expect\" actual\n \t  else\n@@ -154,9 +154,9 @@ test_expect_success 'merging should conflict for non fast-forward (resolution ex\n \t  git rev-parse --short sub-d > ../expect) &&\n \t  if test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \t  then\n-\t\ttest_must_fail git merge c >actual &&\n+\t\ttest_must_fail git merge c >actual 2>sub-actual &&\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)\" &&\n-\t\tgrep \"$sub_expect\" actual\n+\t\tgrep \"$sub_expect\" sub-actual\n \t  else\n \t\ttest_must_fail git merge c 2> actual\n \t  fi &&\n@@ -181,9 +181,9 @@ test_expect_success 'merging should fail for ambiguous common parent' '\n \t ) &&\n \t if test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \t then\n-\t\ttest_must_fail git merge c >actual &&\n+\t\ttest_must_fail git merge c >actual 2>sub-actual &&\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)\" &&\n-\t\tgrep \"$sub_expect\" actual\n+\t\tgrep \"$sub_expect\" sub-actual\n \t else\n \t\ttest_must_fail git merge c 2> actual\n \t fi &&\n@@ -227,7 +227,7 @@ test_expect_success 'merging should fail for changes that are backwards' '\n \tgit commit -a -m \"f\" &&\n \n \tgit checkout -b test-backward e &&\n-\ttest_must_fail git merge f >actual &&\n+\ttest_must_fail git merge f 2>actual &&\n \tif test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n     then\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-d)\" &&\n@@ -535,7 +535,7 @@ test_expect_success 'merging should fail with no merge base' '\n \tgit checkout -b b init &&\n \tgit add sub &&\n \tgit commit -m \"b\" &&\n-\ttest_must_fail git merge a >actual &&\n+\ttest_must_fail git merge a 2>actual &&\n \tif test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n     then\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short HEAD^1)\" &&\ndiff --git a/t/t7402-submodule-rebase.sh b/t/t7402-submodule-rebase.sh\nindex 2b3c363078b..aa2fdc31d1a 100755\n--- a/t/t7402-submodule-rebase.sh\n+++ b/t/t7402-submodule-rebase.sh\n@@ -116,7 +116,7 @@ test_expect_success 'rebasing submodule that should conflict' '\n \ttest_tick &&\n \tgit commit -m fourth &&\n \n-\ttest_must_fail git rebase --onto HEAD^^ HEAD^ HEAD^0 >actual_output &&\n+\ttest_must_fail git rebase --onto HEAD^^ HEAD^ HEAD^0 2>actual_output &&\n \tgit ls-files -s submodule >actual &&\n \t(\n \t\tcd submodule &&\n\nbase-commit: b50a608ba20348cb3dfc16a696816d51780e3f0f\n-- \ngitgitgadget\n"},{"id":"489372","messageId":"pull.1661.v2.git.git.1708954048301.gitgitgadget@gmail.com","threadId":"60806","inReplyTo":"pull.1661.git.git.1706534968589.gitgitgadget@gmail.com","subject":"[PATCH v2] merge-ort: turn submodule conflict suggestions into an advice","fromName":"Philippe Blain via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-02-26T13:27:28Z","receivedAt":"2024-02-26T13:27:32Z","isPatch":true,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"From: Philippe Blain <levraiphilippeblain@gmail.com>\n\nAdd a new advice type 'submoduleMergeConflict' for the error message\nshown when a non-trivial submodule conflict is encountered, which was\nadded in 4057523a40 (submodule merge: update conflict error message,\n2022-08-04). That commit mentions making this message an advice as\npossible future work. Only show the advice if it is enabled.\n\nUpdate the tests as the expected message now appears on stderr instead\nof stdout.\n\nSigned-off-by: Philippe Blain <levraiphilippeblain@gmail.com>\n---\n    merge-ort: turn submodule conflict suggestions into an advice\n    \n    Changes since v1:\n    \n     * Rebased onto v2.44.0 to solve conflicts\n     * CC'ed more people involved in the thread where the message was added\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1661%2Fphil-blain%2Fmerge-submodule-conflict-advice-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1661/phil-blain/merge-submodule-conflict-advice-v2\nPull-Request: https://github.com/git/git/pull/1661\n\nRange-diff vs v1:\n\n 1:  e77f3453fe1 ! 1:  a6d631e0c69 merge-ort: turn submodule conflict suggestions into an advice\n     @@ Commit message\n          shown when a non-trivial submodule conflict is encountered, which was\n          added in 4057523a40 (submodule merge: update conflict error message,\n          2022-08-04). That commit mentions making this message an advice as\n     -    possible future work.\n     +    possible future work. Only show the advice if it is enabled.\n      \n          Update the tests as the expected message now appears on stderr instead\n          of stdout.\n     @@ Documentation/config/advice.txt: advice.*::\n      \n       ## advice.c ##\n      @@ advice.c: static struct {\n     - \t[ADVICE_STATUS_U_OPTION]\t\t\t= { \"statusUoption\", 1 },\n     - \t[ADVICE_SUBMODULES_NOT_UPDATED] \t\t= { \"submodulesNotUpdated\", 1 },\n     - \t[ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE] = { \"submoduleAlternateErrorStrategyDie\", 1 },\n     -+\t[ADVICE_SUBMODULE_MERGE_CONFLICT]               = { \"submoduleMergeConflict\", 1  },\n     - \t[ADVICE_SUGGEST_DETACHING_HEAD]\t\t\t= { \"suggestDetachingHead\", 1 },\n     - \t[ADVICE_UPDATE_SPARSE_PATH]\t\t\t= { \"updateSparsePath\", 1 },\n     - \t[ADVICE_WAITING_FOR_EDITOR]\t\t\t= { \"waitingForEditor\", 1 },\n     + \t[ADVICE_STATUS_U_OPTION]\t\t\t= { \"statusUoption\" },\n     + \t[ADVICE_SUBMODULES_NOT_UPDATED] \t\t= { \"submodulesNotUpdated\" },\n     + \t[ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE] = { \"submoduleAlternateErrorStrategyDie\" },\n     ++\t[ADVICE_SUBMODULE_MERGE_CONFLICT]               = { \"submoduleMergeConflict\" },\n     + \t[ADVICE_SUGGEST_DETACHING_HEAD]\t\t\t= { \"suggestDetachingHead\" },\n     + \t[ADVICE_UPDATE_SPARSE_PATH]\t\t\t= { \"updateSparsePath\" },\n     + \t[ADVICE_WAITING_FOR_EDITOR]\t\t\t= { \"waitingForEditor\" },\n      \n       ## advice.h ##\n      @@ advice.h: enum advice_type {\n\n\n Documentation/config/advice.txt |  3 +++\n advice.c                        |  1 +\n advice.h                        |  1 +\n merge-ort.c                     |  3 ++-\n t/t6437-submodule-merge.sh      | 14 +++++++-------\n t/t7402-submodule-rebase.sh     |  2 +-\n 6 files changed, 15 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt\nindex c7ea70f2e2e..dde8e7840ef 100644\n--- a/Documentation/config/advice.txt\n+++ b/Documentation/config/advice.txt\n@@ -129,6 +129,9 @@ advice.*::\n \tsubmoduleAlternateErrorStrategyDie::\n \t\tAdvice shown when a submodule.alternateErrorStrategy option\n \t\tconfigured to \"die\" causes a fatal error.\n+\tsubmoduleMergeConflict::\n+\t\tAdvice shown when a non-trivial submodule merge conflict is\n+\t\tencountered.\n \tsubmodulesNotUpdated::\n \t\tAdvice shown when a user runs a submodule command that fails\n \t\tbecause `git submodule update --init` was not run.\ndiff --git a/advice.c b/advice.c\nindex 6e9098ff089..4ba64ee5b2d 100644\n--- a/advice.c\n+++ b/advice.c\n@@ -79,6 +79,7 @@ static struct {\n \t[ADVICE_STATUS_U_OPTION]\t\t\t= { \"statusUoption\" },\n \t[ADVICE_SUBMODULES_NOT_UPDATED] \t\t= { \"submodulesNotUpdated\" },\n \t[ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE] = { \"submoduleAlternateErrorStrategyDie\" },\n+\t[ADVICE_SUBMODULE_MERGE_CONFLICT]               = { \"submoduleMergeConflict\" },\n \t[ADVICE_SUGGEST_DETACHING_HEAD]\t\t\t= { \"suggestDetachingHead\" },\n \t[ADVICE_UPDATE_SPARSE_PATH]\t\t\t= { \"updateSparsePath\" },\n \t[ADVICE_WAITING_FOR_EDITOR]\t\t\t= { \"waitingForEditor\" },\ndiff --git a/advice.h b/advice.h\nindex 9d4f49ae38b..7d0a821f5cb 100644\n--- a/advice.h\n+++ b/advice.h\n@@ -47,6 +47,7 @@ enum advice_type {\n \tADVICE_STATUS_U_OPTION,\n \tADVICE_SUBMODULES_NOT_UPDATED,\n \tADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE,\n+\tADVICE_SUBMODULE_MERGE_CONFLICT,\n \tADVICE_SUGGEST_DETACHING_HEAD,\n \tADVICE_UPDATE_SPARSE_PATH,\n \tADVICE_WAITING_FOR_EDITOR,\ndiff --git a/merge-ort.c b/merge-ort.c\nindex 8617babee41..6a48aea2275 100644\n--- a/merge-ort.c\n+++ b/merge-ort.c\n@@ -18,6 +18,7 @@\n #include \"merge-ort.h\"\n \n #include \"alloc.h\"\n+#include \"advice.h\"\n #include \"attr.h\"\n #include \"cache-tree.h\"\n #include \"commit.h\"\n@@ -4556,7 +4557,7 @@ static void print_submodule_conflict_suggestion(struct string_list *csub) {\n \t\t      \" - commit the resulting index in the superproject\\n\"),\n \t\t    tmp.buf, subs.buf);\n \n-\tprintf(\"%s\", msg.buf);\n+\tadvise_if_enabled(ADVICE_SUBMODULE_MERGE_CONFLICT, \"%s\", msg.buf);\n \n \tstrbuf_release(&subs);\n \tstrbuf_release(&tmp);\ndiff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh\nindex 70650521b04..7a3f1cb27c1 100755\n--- a/t/t6437-submodule-merge.sh\n+++ b/t/t6437-submodule-merge.sh\n@@ -113,7 +113,7 @@ test_expect_success 'merging should conflict for non fast-forward' '\n \t git checkout -b test-nonforward-a b &&\n \t  if test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \t  then\n-\t\ttest_must_fail git merge c >actual &&\n+\t\ttest_must_fail git merge c 2>actual &&\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)\" &&\n \t\tgrep \"$sub_expect\" actual\n \t  else\n@@ -154,9 +154,9 @@ test_expect_success 'merging should conflict for non fast-forward (resolution ex\n \t  git rev-parse --short sub-d > ../expect) &&\n \t  if test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \t  then\n-\t\ttest_must_fail git merge c >actual &&\n+\t\ttest_must_fail git merge c >actual 2>sub-actual &&\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)\" &&\n-\t\tgrep \"$sub_expect\" actual\n+\t\tgrep \"$sub_expect\" sub-actual\n \t  else\n \t\ttest_must_fail git merge c 2> actual\n \t  fi &&\n@@ -181,9 +181,9 @@ test_expect_success 'merging should fail for ambiguous common parent' '\n \t ) &&\n \t if test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n \t then\n-\t\ttest_must_fail git merge c >actual &&\n+\t\ttest_must_fail git merge c >actual 2>sub-actual &&\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-c)\" &&\n-\t\tgrep \"$sub_expect\" actual\n+\t\tgrep \"$sub_expect\" sub-actual\n \t else\n \t\ttest_must_fail git merge c 2> actual\n \t fi &&\n@@ -227,7 +227,7 @@ test_expect_success 'merging should fail for changes that are backwards' '\n \tgit commit -a -m \"f\" &&\n \n \tgit checkout -b test-backward e &&\n-\ttest_must_fail git merge f >actual &&\n+\ttest_must_fail git merge f 2>actual &&\n \tif test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n     then\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short sub-d)\" &&\n@@ -535,7 +535,7 @@ test_expect_success 'merging should fail with no merge base' '\n \tgit checkout -b b init &&\n \tgit add sub &&\n \tgit commit -m \"b\" &&\n-\ttest_must_fail git merge a >actual &&\n+\ttest_must_fail git merge a 2>actual &&\n \tif test \"$GIT_TEST_MERGE_ALGORITHM\" = ort\n     then\n \t\tsub_expect=\"go to submodule (sub), and either merge commit $(git -C sub rev-parse --short HEAD^1)\" &&\ndiff --git a/t/t7402-submodule-rebase.sh b/t/t7402-submodule-rebase.sh\nindex 2b3c363078b..aa2fdc31d1a 100755\n--- a/t/t7402-submodule-rebase.sh\n+++ b/t/t7402-submodule-rebase.sh\n@@ -116,7 +116,7 @@ test_expect_success 'rebasing submodule that should conflict' '\n \ttest_tick &&\n \tgit commit -m fourth &&\n \n-\ttest_must_fail git rebase --onto HEAD^^ HEAD^ HEAD^0 >actual_output &&\n+\ttest_must_fail git rebase --onto HEAD^^ HEAD^ HEAD^0 2>actual_output &&\n \tgit ls-files -s submodule >actual &&\n \t(\n \t\tcd submodule &&\n\nbase-commit: 3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0\n-- \ngitgitgadget\n"},{"id":"489383","messageId":"xmqqh6hvfb6c.fsf@gitster.g","threadId":"60806","inReplyTo":"pull.1661.v2.git.git.1708954048301.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] merge-ort: turn submodule conflict suggestions into an advice","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-26T16:22:03Z","receivedAt":"2024-02-26T16:22:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Philippe Blain via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Philippe Blain <levraiphilippeblain@gmail.com>\n>\n> Add a new advice type 'submoduleMergeConflict' for the error message\n> shown when a non-trivial submodule conflict is encountered, which was\n> added in 4057523a40 (submodule merge: update conflict error message,\n> 2022-08-04). That commit mentions making this message an advice as\n> possible future work. Only show the advice if it is enabled.\n\nWhen specifically called out like this, it makes it sound as if this\none is disabled by default, while everybody else is enabled unless it\nis disabled.\n\n> Update the tests as the expected message now appears on stderr instead\n> of stdout.\n\nMakes sense.\n\nThanks.\n"},{"id":"489404","messageId":"c00617b0-b673-b52c-db15-278a67370e75@gmail.com","threadId":"60806","inReplyTo":"xmqqh6hvfb6c.fsf@gitster.g","subject":"Re: [PATCH v2] merge-ort: turn submodule conflict suggestions into an advice","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2024-02-26T18:14:08Z","receivedAt":"2024-02-26T18:14:10Z","isPatch":true,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi Junio,\n\nLe 2024-02-26 à 11:22, Junio C Hamano a écrit :\n> \"Philippe Blain via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> \n>> From: Philippe Blain <levraiphilippeblain@gmail.com>\n>>\n>> Add a new advice type 'submoduleMergeConflict' for the error message\n>> shown when a non-trivial submodule conflict is encountered, which was\n>> added in 4057523a40 (submodule merge: update conflict error message,\n>> 2022-08-04). That commit mentions making this message an advice as\n>> possible future work. Only show the advice if it is enabled.\n> \n> When specifically called out like this, it makes it sound as if this\n> one is disabled by default, while everybody else is enabled unless it\n> is disabled.\n\nYes, re-reading myself, this did not come out as I wanted. I'll update\nthe message to read more like \"Adjust merge-ort.c::print_submodule_conflict_suggestion \nto use the advice API\" or something like this.\n\nThanks,\nPhilippe.\n\n"},{"id":"489406","messageId":"xmqq34tfnkh1.fsf@gitster.g","threadId":"60806","inReplyTo":"c00617b0-b673-b52c-db15-278a67370e75@gmail.com","subject":"Re: [PATCH v2] merge-ort: turn submodule conflict suggestions into an advice","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-26T18:34:02Z","receivedAt":"2024-02-26T18:34:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philippe Blain <levraiphilippeblain@gmail.com> writes:\n\n> Hi Junio,\n>\n> Le 2024-02-26 à 11:22, Junio C Hamano a écrit :\n>> \"Philippe Blain via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>> \n>>> From: Philippe Blain <levraiphilippeblain@gmail.com>\n>>>\n>>> Add a new advice type 'submoduleMergeConflict' for the error message\n>>> shown when a non-trivial submodule conflict is encountered, which was\n>>> added in 4057523a40 (submodule merge: update conflict error message,\n>>> 2022-08-04). That commit mentions making this message an advice as\n>>> possible future work. Only show the advice if it is enabled.\n>> \n>> When specifically called out like this, it makes it sound as if this\n>> one is disabled by default, while everybody else is enabled unless it\n>> is disabled.\n>\n> Yes, re-reading myself, this did not come out as I wanted. I'll update\n> the message to read more like \"Adjust merge-ort.c::print_submodule_conflict_suggestion \n> to use the advice API\" or something like this.\n\nI've replaced the last sentence with \"\"\"The message can now be\ndisabled with the advice mechanism.\"\"\"\n\n    \n"}]}