Skip to content

Commit 29a7501

Browse files
AdityaGarg8gitster
authored andcommitted
imap-send: fix minor mistakes in the logs
Some minor mistakes have been found in the logs. Most of them include error messages starting with a capital letter, and ending with a period. Also, abbreviations like "IMAP" and "OK" should be in uppercase. Fix them. Signed-off-by: Aditya Garg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0fa3ab8 commit 29a7501

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

imap-send.c

Lines changed: 14 additions & 14 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

@@ -1020,7 +1020,7 @@ static int auth_cram_md5(struct imap_store *ctx, const char *prompt)
10201020
ret = socket_write(&ctx->imap->buf.sock, response, strlen(response));
10211021
if (ret != strlen(response)) {
10221022
free(response);
1023-
return error("IMAP error: sending response failed");
1023+
return error("IMAP error: sending CRAM-MD5 response failed");
10241024
}
10251025

10261026
free(response);
@@ -1128,7 +1128,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11281128
imap->buf.sock.fd[0] = tunnel.out;
11291129
imap->buf.sock.fd[1] = tunnel.in;
11301130

1131-
imap_info("ok\n");
1131+
imap_info("OK\n");
11321132
} else {
11331133
#ifndef NO_IPV6
11341134
struct addrinfo hints, *ai0, *ai;
@@ -1147,7 +1147,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11471147
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(gai));
11481148
goto bail;
11491149
}
1150-
imap_info("ok\n");
1150+
imap_info("OK\n");
11511151

11521152
for (ai0 = ai; ai; ai = ai->ai_next) {
11531153
char addr[NI_MAXHOST];
@@ -1185,7 +1185,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11851185
perror("gethostbyname");
11861186
goto bail;
11871187
}
1188-
imap_info("ok\n");
1188+
imap_info("OK\n");
11891189

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

@@ -1199,7 +1199,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11991199
}
12001200
#endif
12011201
if (s < 0) {
1202-
fputs("Error: unable to connect to server.\n", stderr);
1202+
fputs("error: unable to connect to server\n", stderr);
12031203
goto bail;
12041204
}
12051205

@@ -1211,7 +1211,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
12111211
close(s);
12121212
goto bail;
12131213
}
1214-
imap_info("ok\n");
1214+
imap_info("OK\n");
12151215
}
12161216

12171217
/* read the greeting string */
@@ -1342,12 +1342,12 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
13421342
goto bail;
13431343
}
13441344
} else {
1345-
fprintf(stderr, "Unknown authentication method:%s\n", srvc->host);
1345+
fprintf(stderr, "unknown authentication method:%s\n", srvc->host);
13461346
goto bail;
13471347
}
13481348
} else {
13491349
if (CAP(NOLOGIN)) {
1350-
fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n",
1350+
fprintf(stderr, "skipping account %s@%s, server forbids LOGIN\n",
13511351
srvc->user, srvc->host);
13521352
goto bail;
13531353
}
@@ -1603,7 +1603,7 @@ static int append_msgs_to_imap(struct imap_server_conf *server,
16031603
}
16041604
ctx->name = server->folder;
16051605

1606-
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1606+
fprintf(stderr, "Sending %d message%s\n", total, (total != 1) ? "s" : "");
16071607
while (1) {
16081608
unsigned percent = n * 100 / total;
16091609

@@ -1712,7 +1712,7 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
17121712
curl = setup_curl(server, &cred);
17131713
curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
17141714

1715-
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1715+
fprintf(stderr, "Sending %d message%s\n", total, (total != 1) ? "s" : "");
17161716
while (1) {
17171717
unsigned percent = n * 100 / total;
17181718
int prev_len;
@@ -1796,13 +1796,13 @@ int cmd_main(int argc, const char **argv)
17961796
server.port = server.use_ssl ? 993 : 143;
17971797

17981798
if (!server.folder) {
1799-
fprintf(stderr, "no imap store specified\n");
1799+
fprintf(stderr, "no IMAP store specified\n");
18001800
ret = 1;
18011801
goto out;
18021802
}
18031803
if (!server.host) {
18041804
if (!server.tunnel) {
1805-
fprintf(stderr, "no imap host specified\n");
1805+
fprintf(stderr, "no IMAP host specified\n");
18061806
ret = 1;
18071807
goto out;
18081808
}
@@ -1824,7 +1824,7 @@ int cmd_main(int argc, const char **argv)
18241824

18251825
total = count_messages(&all_msgs);
18261826
if (!total) {
1827-
fprintf(stderr, "no messages to send\n");
1827+
fprintf(stderr, "no messages found to send\n");
18281828
ret = 1;
18291829
goto out;
18301830
}

0 commit comments

Comments
 (0)