Skip to content

Commit 15b4e9b

Browse files
AdityaGarg8gitster
authored andcommitted
imap-send: display the destination mailbox when sending a message
Whenever we sent a message using the `imap-send` command, it would display a log showing the number of messages which are to be sent. For example: Sending 1 message 100% (1/1) done This had been made more informative by adding the name of the destination folder as well: Sending 1 message to Drafts folder... 100% (1/1) done Signed-off-by: Aditya Garg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8c2f934 commit 15b4e9b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

imap-send.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,8 @@ 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 to %s folder...\n",
1607+
total, (total != 1) ? "s" : "", server->folder);
16071608
while (1) {
16081609
unsigned percent = n * 100 / total;
16091610

@@ -1712,7 +1713,8 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
17121713
curl = setup_curl(server, &cred);
17131714
curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
17141715

1715-
fprintf(stderr, "Sending %d message%s\n", total, (total != 1) ? "s" : "");
1716+
fprintf(stderr, "Sending %d message%s to %s folder...\n",
1717+
total, (total != 1) ? "s" : "", server->folder);
17161718
while (1) {
17171719
unsigned percent = n * 100 / total;
17181720
int prev_len;

0 commit comments

Comments
 (0)