{"thread":{"id":"63671","subject":"[PATCH] imap-send: improve error messages for missing configuration","startedAt":"2025-06-19T08:53:43Z","lastAt":"2025-06-20T15:56:31Z","messageCount":11,"participants":["Jörg Thalheim","Junio C Hamano","Aditya Garg","Joerg Thalheim"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"520398","messageId":"8af387d5007b15cce49c924104d0e88522812e42@thalheim.io","threadId":"63671","inReplyTo":null,"subject":"[PATCH] imap-send: improve error messages for missing configuration","fromName":"Jörg Thalheim","fromEmail":"joerg@thalheim.io","sentAt":"2025-06-19T08:53:35Z","receivedAt":"2025-06-19T08:53:43Z","isPatch":true,"sender":{"key":"joerg@thalheim.io","avatar":"https://avatars.githubusercontent.com/u/96200?v=4"},"body":"The error message 'no imap store specified' was confusing because\nit referred to 'store' when the actual missing configuration was\n'imap.folder'. Similarly, the host error message provided no\nguidance on how to fix the issue.\n\nImprove both error messages to:\n- Clearly state what configuration is missing\n- Provide hints showing the exact git config commands needed\n- Include examples of typical values\n\nThis helps users quickly understand and resolve configuration issues\nwhen using git imap-send.\n\nSigned-off-by: Jörg Thalheim <joerg@thalheim.io>\n---\n imap-send.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 2e812f5a6e..a2d6f6d3f6 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -1539,13 +1539,17 @@ int cmd_main(int argc, const char **argv)\n \t\tserver.port = server.use_ssl ? 993 : 143;\n \n \tif (!server.folder) {\n-\t\tfprintf(stderr, \"no imap store specified\\n\");\n+\t\tfprintf(stderr, \"error: no imap folder specified\\n\");\n+\t\tfprintf(stderr, \"hint: set the target folder with 'git config imap.folder <folder>'\\n\");\n+\t\tfprintf(stderr, \"      (e.g., 'git config imap.folder Drafts')\\n\");\n \t\tret = 1;\n \t\tgoto out;\n \t}\n \tif (!server.host) {\n \t\tif (!server.tunnel) {\n-\t\t\tfprintf(stderr, \"no imap host specified\\n\");\n+\t\t\tfprintf(stderr, \"error: no imap host specified\\n\");\n+\t\t\tfprintf(stderr, \"hint: set the imap host with 'git config imap.host <host>'\\n\");\n+\t\t\tfprintf(stderr, \"      (e.g., 'git config imap.host imaps://imap.example.com')\\n\");\n \t\t\tret = 1;\n \t\t\tgoto out;\n \t\t}\n-- \n2.49.0\n"},{"id":"520448","messageId":"xmqq7c178c07.fsf@gitster.g","threadId":"63671","inReplyTo":"8af387d5007b15cce49c924104d0e88522812e42@thalheim.io","subject":"Re: [PATCH] imap-send: improve error messages for missing configuration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-20T00:58:32Z","receivedAt":"2025-06-20T00:58:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Jörg Thalheim\" <joerg@thalheim.io> writes:\n\n> The error message 'no imap store specified' was confusing because\n> it referred to 'store' when the actual missing configuration was\n> 'imap.folder'. Similarly, the host error message provided no\n> guidance on how to fix the issue.\n>\n> Improve both error messages to:\n> - Clearly state what configuration is missing\n> - Provide hints showing the exact git config commands needed\n> - Include examples of typical values\n>\n> This helps users quickly understand and resolve configuration issues\n> when using git imap-send.\n>\n> Signed-off-by: Jörg Thalheim <joerg@thalheim.io>\n> ---\n>  imap-send.c | 8 ++++++--\n>  1 file changed, 6 insertions(+), 2 deletions(-)\n\nIt is curious that you are sending usability improvement patches to\nimap-send, which I was recently told to be completely broken wrt the\nuse of imap.folder.  Is the claim I heard that it is totally broken\nnot true after all, I wonder?\n\nIn any case, there are some patches in flight that rewrites the\nparts of the program this patch wants to update (which addresses\nthat \"completely broken\" part and makes the program usable again).\n\nCan you fix the messages on top of that work?  By doing\n\n $ git checkout --detach origin/master\n $ git merge --no-ff -m 'Merge ag/imap-send-resurrection' adbc0b5d\n $ git checkout -b jt/imap-send-error-message-fix\n\nyou can prepare the ground and then fix the messages there.\n\nYou might want to consider using the advise() API to add the hints,\nand please make that a separate patch on top of the \"What's imap\nstore?  We call it a folder!\" patch.\n\nThanks.\n\n> diff --git a/imap-send.c b/imap-send.c\n> index 2e812f5a6e..a2d6f6d3f6 100644\n> --- a/imap-send.c\n> +++ b/imap-send.c\n> @@ -1539,13 +1539,17 @@ int cmd_main(int argc, const char **argv)\n>  \t\tserver.port = server.use_ssl ? 993 : 143;\n>  \n>  \tif (!server.folder) {\n> -\t\tfprintf(stderr, \"no imap store specified\\n\");\n> +\t\tfprintf(stderr, \"error: no imap folder specified\\n\");\n> +\t\tfprintf(stderr, \"hint: set the target folder with 'git config imap.folder <folder>'\\n\");\n> +\t\tfprintf(stderr, \"      (e.g., 'git config imap.folder Drafts')\\n\");\n>  \t\tret = 1;\n>  \t\tgoto out;\n>  \t}\n>  \tif (!server.host) {\n>  \t\tif (!server.tunnel) {\n> -\t\t\tfprintf(stderr, \"no imap host specified\\n\");\n> +\t\t\tfprintf(stderr, \"error: no imap host specified\\n\");\n> +\t\t\tfprintf(stderr, \"hint: set the imap host with 'git config imap.host <host>'\\n\");\n> +\t\t\tfprintf(stderr, \"      (e.g., 'git config imap.host imaps://imap.example.com')\\n\");\n>  \t\t\tret = 1;\n>  \t\t\tgoto out;\n>  \t\t}\n"},{"id":"520463","messageId":"PN3PR01MB95979FD989FB98E5F1F27145B87CA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM","threadId":"63671","inReplyTo":"xmqq7c178c07.fsf@gitster.g","subject":"Re: [PATCH] imap-send: improve error messages for missing configuration","fromName":"Aditya Garg","fromEmail":"gargaditya08@live.com","sentAt":"2025-06-20T05:03:21Z","receivedAt":"2025-06-20T05:03:28Z","isPatch":true,"sender":{"key":"gargaditya08@live.com","avatar":"https://avatars.githubusercontent.com/u/85610623?v=4"},"body":"\n\nOn 20 June 2025 6:28:32 am IST, Junio C Hamano <gitster@pobox.com> wrote:\n>\"Jörg Thalheim\" <joerg@thalheim.io> writes:\n>\n>> The error message 'no imap store specified' was confusing because\n>> it referred to 'store' when the actual missing configuration was\n>> 'imap.folder'. Similarly, the host error message provided no\n>> guidance on how to fix the issue.\n>>\n>> Improve both error messages to:\n>> - Clearly state what configuration is missing\n>> - Provide hints showing the exact git config commands needed\n>> - Include examples of typical values\n>>\n>> This helps users quickly understand and resolve configuration issues\n>> when using git imap-send.\n>>\n>> Signed-off-by: Jörg Thalheim <joerg@thalheim.io>\n>> ---\n>>  imap-send.c | 8 ++++++--\n>>  1 file changed, 6 insertions(+), 2 deletions(-)\n>\n>It is curious that you are sending usability improvement patches to\n>imap-send, which I was recently told to be completely broken wrt the\n>use of imap.folder.  Is the claim I heard that it is totally broken\n>not true after all, I wonder?\n\nI assume either the person has used the seen branch, or has not tested the program itself.\n"},{"id":"520464","messageId":"PN3PR01MB95975D22DBF75791CF1693C8B87CA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM","threadId":"63671","inReplyTo":"PN3PR01MB95979FD989FB98E5F1F27145B87CA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM","subject":"Re: [PATCH] imap-send: improve error messages for missing configuration","fromName":"Aditya Garg","fromEmail":"gargaditya08@live.com","sentAt":"2025-06-20T05:05:20Z","receivedAt":"2025-06-20T05:05:27Z","isPatch":true,"sender":{"key":"gargaditya08@live.com","avatar":"https://avatars.githubusercontent.com/u/85610623?v=4"},"body":"\n\nOn 20 June 2025 10:33:21 am IST, Aditya Garg <gargaditya08@live.com> wrote:\n>\n>\n>On 20 June 2025 6:28:32 am IST, Junio C Hamano <gitster@pobox.com> wrote:\n>>\"Jörg Thalheim\" <joerg@thalheim.io> writes:\n>>\n>>> The error message 'no imap store specified' was confusing because\n>>> it referred to 'store' when the actual missing configuration was\n>>> 'imap.folder'. Similarly, the host error message provided no\n>>> guidance on how to fix the issue.\n>>>\n>>> Improve both error messages to:\n>>> - Clearly state what configuration is missing\n>>> - Provide hints showing the exact git config commands needed\n>>> - Include examples of typical values\n>>>\n>>> This helps users quickly understand and resolve configuration issues\n>>> when using git imap-send.\n>>>\n>>> Signed-off-by: Jörg Thalheim <joerg@thalheim.io>\n>>> ---\n>>>  imap-send.c | 8 ++++++--\n>>>  1 file changed, 6 insertions(+), 2 deletions(-)\n>>\n>>It is curious that you are sending usability improvement patches to\n>>imap-send, which I was recently told to be completely broken wrt the\n>>use of imap.folder.  Is the claim I heard that it is totally broken\n>>not true after all, I wonder?\n>\n>I assume either the person has used the seen branch, or has not tested the program itself.\n\nActually you get the error:\n\nno imap store specified\n\nIn the broken imap send irrespective of what you do IIRC. Maybe that's what is being addressed here.\n"},{"id":"520466","messageId":"20250620063836.252881-1-joerg@thalheim.io","threadId":"63671","inReplyTo":"8af387d5007b15cce49c924104d0e88522812e42@thalheim.io","subject":"[PATCH v2 0/2] imap-send: improve error messages for missing configuration","fromName":"Joerg Thalheim","fromEmail":"joerg@thalheim.io","sentAt":"2025-06-20T06:38:34Z","receivedAt":"2025-06-20T06:38:45Z","isPatch":true,"sender":{"key":"joerg@thalheim.io","avatar":"https://avatars.githubusercontent.com/u/96200?v=4"},"body":"From: Jörg Thalheim <joerg@thalheim.io>\n\nThis patch series improves error messages when required IMAP configuration\nis missing, making it easier for users to understand and fix the issue.\n\nChanges since v1:\n- Rebased on top of ag/imap-send-resurrection branch as requested\n- Split into two patches:\n  * First patch fixes the confusing \"store\" → \"folder\" terminology\n  * Second patch adds configuration hints using advise() API\n- Use error() and advise() instead of fprintf() for better integration\n  with Git's message handling\n\nThanks to Junio for the helpful feedback on v1.\n\nJörg Thalheim (2):\n  imap-send: fix confusing 'store' terminology in error message\n  imap-send: improve error messages with configuration hints\n\n imap-send.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\n-- \n2.49.0\n\n"},{"id":"520467","messageId":"20250620063836.252881-2-joerg@thalheim.io","threadId":"63671","inReplyTo":"20250620063836.252881-1-joerg@thalheim.io","subject":"[PATCH v2 1/2] imap-send: fix confusing 'store' terminology in error message","fromName":"Joerg Thalheim","fromEmail":"joerg@thalheim.io","sentAt":"2025-06-20T06:38:35Z","receivedAt":"2025-06-20T06:38:47Z","isPatch":true,"sender":{"key":"joerg@thalheim.io","avatar":"https://avatars.githubusercontent.com/u/96200?v=4"},"body":"From: Jörg Thalheim <joerg@thalheim.io>\n\nThe error message 'no imap store specified' is misleading because\nit refers to 'store' when the actual missing configuration is\n'imap.folder'. Update the message to use the correct terminology\nthat matches the configuration variable name.\n\nThis reduces confusion for users who might otherwise look for\nnon-existent 'imap.store' configuration when they see this error.\n\nSigned-off-by: Jörg Thalheim <joerg@thalheim.io>\n---\n imap-send.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex ed4c34dadd..33690cd66a 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -1831,7 +1831,7 @@ int cmd_main(int argc, const char **argv)\n \t}\n \n \tif (!server.folder) {\n-\t\tfprintf(stderr, \"no IMAP store specified\\n\");\n+\t\tfprintf(stderr, \"no IMAP folder specified\\n\");\n \t\tret = 1;\n \t\tgoto out;\n \t}\n-- \n2.49.0\n\n"},{"id":"520468","messageId":"20250620063836.252881-3-joerg@thalheim.io","threadId":"63671","inReplyTo":"20250620063836.252881-1-joerg@thalheim.io","subject":"[PATCH v2 2/2] imap-send: improve error messages with configuration hints","fromName":"Joerg Thalheim","fromEmail":"joerg@thalheim.io","sentAt":"2025-06-20T06:38:36Z","receivedAt":"2025-06-20T06:38:48Z","isPatch":true,"sender":{"key":"joerg@thalheim.io","avatar":"https://avatars.githubusercontent.com/u/96200?v=4"},"body":"From: Jörg Thalheim <joerg@thalheim.io>\n\nReplace basic error messages with more helpful ones that guide users\non how to resolve configuration issues. When imap.host or imap.folder\nare missing, provide the exact git config commands needed to fix the\nproblem, along with examples of typical values.\n\nThis uses the advise() API to display hints that can be disabled\nby users who don't want them, and error() for the main error message.\n\nSigned-off-by: Jörg Thalheim <joerg@thalheim.io>\n---\n imap-send.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 33690cd66a..e4613aa236 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -25,6 +25,7 @@\n #define DISABLE_SIGN_COMPARE_WARNINGS\n \n #include \"git-compat-util.h\"\n+#include \"advice.h\"\n #include \"config.h\"\n #include \"credential.h\"\n #include \"gettext.h\"\n@@ -1811,7 +1812,9 @@ int cmd_main(int argc, const char **argv)\n \n \tif (!server.host) {\n \t\tif (!server.tunnel) {\n-\t\t\tfprintf(stderr, \"no IMAP host specified\\n\");\n+\t\t\terror(_(\"no IMAP host specified\"));\n+\t\t\tadvise(_(\"set the IMAP host with 'git config imap.host <host>'\"));\n+\t\t\tadvise(_(\"(e.g., 'git config imap.host imaps://imap.example.com')\"));\n \t\t\tret = 1;\n \t\t\tgoto out;\n \t\t}\n@@ -1831,7 +1834,9 @@ int cmd_main(int argc, const char **argv)\n \t}\n \n \tif (!server.folder) {\n-\t\tfprintf(stderr, \"no IMAP folder specified\\n\");\n+\t\terror(_(\"no IMAP folder specified\"));\n+\t\tadvise(_(\"set the target folder with 'git config imap.folder <folder>'\"));\n+\t\tadvise(_(\"(e.g., 'git config imap.folder Drafts')\"));\n \t\tret = 1;\n \t\tgoto out;\n \t}\n-- \n2.49.0\n\n"},{"id":"520499","messageId":"xmqqldpm4duy.fsf@gitster.g","threadId":"63671","inReplyTo":"20250620063836.252881-3-joerg@thalheim.io","subject":"Re: [PATCH v2 2/2] imap-send: improve error messages with configuration hints","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-06-20T15:44:21Z","receivedAt":"2025-06-20T15:44:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joerg Thalheim <joerg@thalheim.io> writes:\n\n> From: Jörg Thalheim <joerg@thalheim.io>\n>\n> Replace basic error messages with more helpful ones that guide users\n> on how to resolve configuration issues. When imap.host or imap.folder\n> are missing, provide the exact git config commands needed to fix the\n> problem, along with examples of typical values.\n>\n> This uses the advise() API to display hints that can be disabled\n> by users who don't want them,\n\nNot quite.  We do not encourage or condone wholesale disabling of\nall advise messages by end users.  The advice_if_enabled() helper\nallows selective disabling of individual messages that the user has\nseen often enough and find no more need for help, but I do not think\nit is advisable (no pun intended) to use it in these particular code\npaths, simply because once the relevant configuration variables are\nset, the users will not see the errors anymore.\n\nThe reason advise() was suggested was primarily because of its\nbetter handling of multi-line messages.  It can be fed a multi-line\nmessage (i.e., with embedded LF in it), and give \"hint:\" prefix to\neach line, which is lacking from the error(), warning(), die() family\nof messaging functions.\n\n> +\t\t\terror(_(\"no IMAP host specified\"));\n> +\t\t\tadvise(_(\"set the IMAP host with 'git config imap.host <host>'\"));\n> +\t\t\tadvise(_(\"(e.g., 'git config imap.host imaps://imap.example.com')\"));\n\nGive a single multi-line message to a single advise() call, i.e.,\n\n\tadvice(_(\"set the IMAP host with ... <host>'.\\n\"\n        \t \"(e.g., 'git config ....com')\"));\n\ninstead of two back-to-back calls to advise.  It allows the\ntranslators to find points to break lines better than the programmer\nwho wrote these advise() call(s).\n\n> @@ -1831,7 +1834,9 @@ int cmd_main(int argc, const char **argv)\n>  \t}\n>  \n>  \tif (!server.folder) {\n> -\t\tfprintf(stderr, \"no IMAP folder specified\\n\");\n> +\t\terror(_(\"no IMAP folder specified\"));\n> +\t\tadvise(_(\"set the target folder with 'git config imap.folder <folder>'\"));\n> +\t\tadvise(_(\"(e.g., 'git config imap.folder Drafts')\"));\n\nDitto.\n\nAs a #leftoverbit we might want to inspect many fprintf(stderr)\nstill remain in this program after this patch and turn them into\ncalls to appropriate error() or warning() or whatever, but that\ncertainly would be outside the scope of this patch.\n\nThanks.\n"},{"id":"520502","messageId":"20250620155614.901816-1-joerg@thalheim.io","threadId":"63671","inReplyTo":"8af387d5007b15cce49c924104d0e88522812e42@thalheim.io","subject":"[PATCH v3 0/2] imap-send: improve error messages for missing configuration","fromName":"Joerg Thalheim","fromEmail":"joerg@thalheim.io","sentAt":"2025-06-20T15:56:12Z","receivedAt":"2025-06-20T15:56:28Z","isPatch":true,"sender":{"key":"joerg@thalheim.io","avatar":"https://avatars.githubusercontent.com/u/96200?v=4"},"body":"From: Jörg Thalheim <joerg@thalheim.io>\n\nThis patch series improves error messages when required IMAP configuration\nis missing, making it easier for users to understand and fix the issue.\n\nChanges since v2:\n- Use single advise() calls with multi-line strings instead of multiple\n  calls, as suggested by Junio\n- Simplified commit message explanation about advise() API\n\nChanges since v1:\n- Rebased on top of ag/imap-send-resurrection branch\n- Split into two patches:\n  * First patch fixes the confusing \"store\" → \"folder\" terminology\n  * Second patch adds configuration hints using advise() API\n- Use error() and advise() instead of fprintf()\n\nThanks to Junio for the helpful reviews.\n\nJörg Thalheim (2):\n  imap-send: fix confusing 'store' terminology in error message\n  imap-send: improve error messages with configuration hints\n\n imap-send.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\n-- \n2.49.0\n\n"},{"id":"520501","messageId":"20250620155614.901816-2-joerg@thalheim.io","threadId":"63671","inReplyTo":"20250620155614.901816-1-joerg@thalheim.io","subject":"[PATCH v3 1/2] imap-send: fix confusing 'store' terminology in error message","fromName":"Joerg Thalheim","fromEmail":"joerg@thalheim.io","sentAt":"2025-06-20T15:56:13Z","receivedAt":"2025-06-20T15:56:29Z","isPatch":true,"sender":{"key":"joerg@thalheim.io","avatar":"https://avatars.githubusercontent.com/u/96200?v=4"},"body":"From: Jörg Thalheim <joerg@thalheim.io>\n\nThe error message 'no imap store specified' is misleading because\nit refers to 'store' when the actual missing configuration is\n'imap.folder'. Update the message to use the correct terminology\nthat matches the configuration variable name.\n\nThis reduces confusion for users who might otherwise look for\nnon-existent 'imap.store' configuration when they see this error.\n\nSigned-off-by: Jörg Thalheim <joerg@thalheim.io>\n---\n imap-send.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex ed4c34dadd..33690cd66a 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -1831,7 +1831,7 @@ int cmd_main(int argc, const char **argv)\n \t}\n \n \tif (!server.folder) {\n-\t\tfprintf(stderr, \"no IMAP store specified\\n\");\n+\t\tfprintf(stderr, \"no IMAP folder specified\\n\");\n \t\tret = 1;\n \t\tgoto out;\n \t}\n-- \n2.49.0\n\n"},{"id":"520503","messageId":"20250620155614.901816-3-joerg@thalheim.io","threadId":"63671","inReplyTo":"20250620155614.901816-1-joerg@thalheim.io","subject":"[PATCH v3 2/2] imap-send: improve error messages with configuration hints","fromName":"Joerg Thalheim","fromEmail":"joerg@thalheim.io","sentAt":"2025-06-20T15:56:14Z","receivedAt":"2025-06-20T15:56:31Z","isPatch":true,"sender":{"key":"joerg@thalheim.io","avatar":"https://avatars.githubusercontent.com/u/96200?v=4"},"body":"From: Jörg Thalheim <joerg@thalheim.io>\n\nReplace basic error messages with more helpful ones that guide users\non how to resolve configuration issues. When imap.host or imap.folder\nare missing, provide the exact git config commands needed to fix the\nproblem, along with examples of typical values.\n\nUse the advise() API to display hints in a multi-line format with\nproper \"hint:\" prefixes for each line.\n\nSigned-off-by: Jörg Thalheim <joerg@thalheim.io>\n---\n imap-send.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 33690cd66a..b6fa90960f 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -25,6 +25,7 @@\n #define DISABLE_SIGN_COMPARE_WARNINGS\n \n #include \"git-compat-util.h\"\n+#include \"advice.h\"\n #include \"config.h\"\n #include \"credential.h\"\n #include \"gettext.h\"\n@@ -1811,7 +1812,9 @@ int cmd_main(int argc, const char **argv)\n \n \tif (!server.host) {\n \t\tif (!server.tunnel) {\n-\t\t\tfprintf(stderr, \"no IMAP host specified\\n\");\n+\t\t\terror(_(\"no IMAP host specified\"));\n+\t\t\tadvise(_(\"set the IMAP host with 'git config imap.host <host>'.\\n\"\n+\t\t\t\t \"(e.g., 'git config imap.host imaps://imap.example.com')\"));\n \t\t\tret = 1;\n \t\t\tgoto out;\n \t\t}\n@@ -1831,7 +1834,9 @@ int cmd_main(int argc, const char **argv)\n \t}\n \n \tif (!server.folder) {\n-\t\tfprintf(stderr, \"no IMAP folder specified\\n\");\n+\t\terror(_(\"no IMAP folder specified\"));\n+\t\tadvise(_(\"set the target folder with 'git config imap.folder <folder>'.\\n\"\n+\t\t\t \"(e.g., 'git config imap.folder Drafts')\"));\n \t\tret = 1;\n \t\tgoto out;\n \t}\n-- \n2.49.0\n\n"}]}