Skip to content

Commit 41d0310

Browse files
committed
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
2 parents 94c9350 + d30bf28 commit 41d0310

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

imap-send.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#define DISABLE_SIGN_COMPARE_WARNINGS
2626

2727
#include "git-compat-util.h"
28+
#include "advice.h"
2829
#include "config.h"
2930
#include "credential.h"
3031
#include "gettext.h"
@@ -1804,7 +1805,9 @@ int cmd_main(int argc, const char **argv)
18041805

18051806
if (!server.host) {
18061807
if (!server.tunnel) {
1807-
fprintf(stderr, "no IMAP host specified\n");
1808+
error(_("no IMAP host specified"));
1809+
advise(_("set the IMAP host with 'git config imap.host <host>'.\n"
1810+
"(e.g., 'git config imap.host imaps://imap.example.com')"));
18081811
ret = 1;
18091812
goto out;
18101813
}
@@ -1824,7 +1827,9 @@ int cmd_main(int argc, const char **argv)
18241827
}
18251828

18261829
if (!server.folder) {
1827-
fprintf(stderr, "no IMAP store specified\n");
1830+
error(_("no IMAP folder specified"));
1831+
advise(_("set the target folder with 'git config imap.folder <folder>'.\n"
1832+
"(e.g., 'git config imap.folder Drafts')"));
18281833
ret = 1;
18291834
goto out;
18301835
}

0 commit comments

Comments
 (0)