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 <gargaditya08@live.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Aditya Garg committed Jun 20, 2025 at 12:10 UTC bf22c370b966cfccf43539f6e6698dbfc79eceff
1 file changed +4 -2
imap-send.c
+4 -2
@@ -1556,7 +1556,8 @@ static int append_msgs_to_imap(struct imap_server_conf *server,
1556 }
1557 ctx->name = server->folder;
1558
1559 - fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1559 + fprintf(stderr, "Sending %d message%s to %s folder...\n",
1560 + total, (total != 1) ? "s" : "", server->folder);
1561 while (1) {
1562 unsigned percent = n * 100 / total;
1563
@@ -1692,7 +1693,8 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
1693
1694 curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
1695
1695 - fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
1696 + fprintf(stderr, "Sending %d message%s to %s folder...\n",
1697 + total, (total != 1) ? "s" : "", server->folder);
1698 while (1) {
1699 unsigned percent = n * 100 / total;
1700 int prev_len;