diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-07-02 12:08:05 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-02 12:08:05 -0700 |
| commit | 41d0310a83aba75a19585d8fbbf021938d8d2ace (patch) | |
| tree | 92115a8be8d884da3ed3975e831fe41a238eeb08 | |
| parent | Merge branch 'ps/contrib-sweep' (diff) | |
| parent | imap-send: improve error messages with configuration hints (diff) | |
| download | git-41d0310a83aba75a19585d8fbbf021938d8d2ace.tar.gz git-41d0310a83aba75a19585d8fbbf021938d8d2ace.zip | |
Merge branch 'jt/imap-send-message-fix'
Update some error messages from "git imap-send".
* jt/imap-send-message-fix:
imap-send: improve error messages with configuration hints
imap-send: fix confusing 'store' terminology in error message
| -rw-r--r-- | imap-send.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/imap-send.c b/imap-send.c index 603e3d6fbc..f5a656ac71 100644 --- a/imap-send.c +++ b/imap-send.c @@ -25,6 +25,7 @@ #define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" +#include "advice.h" #include "config.h" #include "credential.h" #include "gettext.h" @@ -1804,7 +1805,9 @@ int cmd_main(int argc, const char **argv) if (!server.host) { if (!server.tunnel) { - fprintf(stderr, "no IMAP host specified\n"); + error(_("no IMAP host specified")); + advise(_("set the IMAP host with 'git config imap.host <host>'.\n" + "(e.g., 'git config imap.host imaps://imap.example.com')")); ret = 1; goto out; } @@ -1824,7 +1827,9 @@ int cmd_main(int argc, const char **argv) } if (!server.folder) { - fprintf(stderr, "no IMAP store specified\n"); + error(_("no IMAP folder specified")); + advise(_("set the target folder with 'git config imap.folder <folder>'.\n" + "(e.g., 'git config imap.folder Drafts')")); ret = 1; goto out; } |
