Skip to content

Commit 27ab125

Browse files
AdityaGarg8gitster
authored andcommitted
imap-send: fix numerous spelling and grammar mistakes in logs
A lot of spelling and grammar mistakes were found in the logs shown to the user while using imap-send. Most of them are lack of a full stop at the end of a sentence and first word of a sentence not being capitalized. Signed-off-by: Aditya Garg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2a586b6 commit 27ab125

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

imap-send.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static int ssl_socket_connect(struct imap_socket *sock UNUSED,
205205
const struct imap_server_conf *cfg UNUSED,
206206
int use_tls_only UNUSED)
207207
{
208-
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
208+
fprintf(stderr, "SSL requested, but SSL support is not compiled in.\n");
209209
return -1;
210210
}
211211

@@ -249,9 +249,9 @@ static int verify_hostname(X509 *cert, const char *hostname)
249249

250250
/* try the common name */
251251
if (!(subj = X509_get_subject_name(cert)))
252-
return error("cannot get certificate subject");
252+
return error("Cannot get certificate subject");
253253
if ((len = X509_NAME_get_text_by_NID(subj, NID_commonName, cname, sizeof(cname))) < 0)
254-
return error("cannot get certificate common name");
254+
return error("Cannot get certificate common name");
255255
if (strlen(cname) == (size_t)len && host_matches(hostname, cname))
256256
return 0;
257257
return error("certificate owner '%s' does not match hostname '%s'",
@@ -905,7 +905,7 @@ static char *cram(const char *challenge_64, const char *user, const char *pass)
905905
decoded_len = EVP_DecodeBlock((unsigned char *)challenge,
906906
(unsigned char *)challenge_64, encoded_len);
907907
if (decoded_len < 0)
908-
die("invalid challenge %s", challenge_64);
908+
die("Invalid challenge %s", challenge_64);
909909
if (!HMAC(EVP_md5(), pass, strlen(pass), (unsigned char *)challenge, decoded_len, hash, NULL))
910910
die("HMAC error");
911911

@@ -1050,7 +1050,7 @@ static int auth_cram_md5(struct imap_store *ctx, const char *prompt)
10501050
ret = socket_write(&ctx->imap->buf.sock, response, strlen(response));
10511051
if (ret != strlen(response)) {
10521052
free(response);
1053-
return error("IMAP error: sending response failed");
1053+
return error("IMAP error: sending CRAM-MD5 response failed");
10541054
}
10551055

10561056
free(response);
@@ -1144,12 +1144,12 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11441144
tunnel.in = -1;
11451145
tunnel.out = -1;
11461146
if (start_command(&tunnel))
1147-
die("cannot start proxy %s", srvc->tunnel);
1147+
die("Cannot start proxy %s", srvc->tunnel);
11481148

11491149
imap->buf.sock.fd[0] = tunnel.out;
11501150
imap->buf.sock.fd[1] = tunnel.in;
11511151

1152-
imap_info("ok\n");
1152+
imap_info("OK\n");
11531153
} else {
11541154
#ifndef NO_IPV6
11551155
struct addrinfo hints, *ai0, *ai;
@@ -1168,7 +1168,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11681168
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(gai));
11691169
goto bail;
11701170
}
1171-
imap_info("ok\n");
1171+
imap_info("OK\n");
11721172

11731173
for (ai0 = ai; ai; ai = ai->ai_next) {
11741174
char addr[NI_MAXHOST];
@@ -1206,7 +1206,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
12061206
perror("gethostbyname");
12071207
goto bail;
12081208
}
1209-
imap_info("ok\n");
1209+
imap_info("OK\n");
12101210

12111211
addr.sin_addr.s_addr = *((int *) he->h_addr_list[0]);
12121212

@@ -1220,7 +1220,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
12201220
}
12211221
#endif
12221222
if (s < 0) {
1223-
fputs("Error: unable to connect to server.\n", stderr);
1223+
fputs("Error: unable to connect to server\n", stderr);
12241224
goto bail;
12251225
}
12261226

@@ -1232,7 +1232,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
12321232
close(s);
12331233
goto bail;
12341234
}
1235-
imap_info("ok\n");
1235+
imap_info("OK\n");
12361236
}
12371237

12381238
/* read the greeting string */
@@ -1340,13 +1340,13 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
13401340
}
13411341
} else {
13421342
if (CAP(NOLOGIN)) {
1343-
fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n",
1343+
fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN.\n",
13441344
srvc->user, srvc->host);
13451345
goto bail;
13461346
}
13471347
if (!imap->buf.sock.ssl)
13481348
imap_warn("*** IMAP Warning *** Password is being "
1349-
"sent in the clear\n");
1349+
"sent in the clear.\n");
13501350
if (imap_exec(ctx, NULL, "LOGIN \"%s\" \"%s\"", srvc->user, srvc->pass) != RESP_OK) {
13511351
fprintf(stderr, "IMAP error: LOGIN failed\n");
13521352
goto bail;
@@ -1591,12 +1591,12 @@ static int append_msgs_to_imap(struct imap_server_conf *server,
15911591

15921592
ctx = imap_open_store(server, server->folder);
15931593
if (!ctx) {
1594-
fprintf(stderr, "failed to open store\n");
1594+
fprintf(stderr, "Failed to open store.\n");
15951595
return 1;
15961596
}
15971597
ctx->name = server->folder;
15981598

1599-
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1599+
fprintf(stderr, "Sending %d message%s\n", total, (total != 1) ? "s" : "");
16001600
while (1) {
16011601
unsigned percent = n * 100 / total;
16021602

@@ -1648,7 +1648,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
16481648

16491649
uri_encoded_folder = curl_easy_escape(curl, srvc->folder, 0);
16501650
if (!uri_encoded_folder)
1651-
die("failed to encode server folder");
1651+
die("Failed to encode server folder.");
16521652
strbuf_addstr(&path, uri_encoded_folder);
16531653
curl_free(uri_encoded_folder);
16541654

@@ -1704,7 +1704,7 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
17041704
curl = setup_curl(server, &cred);
17051705
curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
17061706

1707-
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1707+
fprintf(stderr, "Sending %d message%s\n", total, (total != 1) ? "s" : "");
17081708
while (1) {
17091709
unsigned percent = n * 100 / total;
17101710
int prev_len;
@@ -1788,13 +1788,13 @@ int cmd_main(int argc, const char **argv)
17881788
server.port = server.use_ssl ? 993 : 143;
17891789

17901790
if (!server.folder) {
1791-
fprintf(stderr, "no imap store specified\n");
1791+
fprintf(stderr, "No IMAP store specified.\n");
17921792
ret = 1;
17931793
goto out;
17941794
}
17951795
if (!server.host) {
17961796
if (!server.tunnel) {
1797-
fprintf(stderr, "no imap host specified\n");
1797+
fprintf(stderr, "No IMAP host specified.\n");
17981798
ret = 1;
17991799
goto out;
18001800
}
@@ -1803,20 +1803,20 @@ int cmd_main(int argc, const char **argv)
18031803

18041804
/* read the messages */
18051805
if (strbuf_read(&all_msgs, 0, 0) < 0) {
1806-
error_errno(_("could not read from stdin"));
1806+
error_errno(_("Could not read from stdin."));
18071807
ret = 1;
18081808
goto out;
18091809
}
18101810

18111811
if (all_msgs.len == 0) {
1812-
fprintf(stderr, "nothing to send\n");
1812+
fprintf(stderr, "Nothing to send.\n");
18131813
ret = 1;
18141814
goto out;
18151815
}
18161816

18171817
total = count_messages(&all_msgs);
18181818
if (!total) {
1819-
fprintf(stderr, "no messages to send\n");
1819+
fprintf(stderr, "No messages found to send.\n");
18201820
ret = 1;
18211821
goto out;
18221822
}

0 commit comments

Comments
 (0)