]> git.ipfire.org Git - thirdparty/git.git/commitdiff
imap-send: display the destination mailbox when sending a message
authorAditya Garg <gargaditya08@live.com>
Fri, 20 Jun 2025 06:40:32 +0000 (12:10 +0530)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jun 2025 15:11:17 +0000 (08:11 -0700)
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>
imap-send.c

index 1894a18f90239fdb9a5d706f400594c603ad2163..2a445edcdae25b9b3206be9b150529e0e6f86cd8 100644 (file)
@@ -1556,7 +1556,8 @@ static int append_msgs_to_imap(struct imap_server_conf *server,
        }
        ctx->name = server->folder;
 
-       fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
+       fprintf(stderr, "Sending %d message%s to %s folder...\n",
+               total, (total != 1) ? "s" : "", server->folder);
        while (1) {
                unsigned percent = n * 100 / total;
 
@@ -1692,7 +1693,8 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
 
        curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
 
-       fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
+       fprintf(stderr, "Sending %d message%s to %s folder...\n",
+               total, (total != 1) ? "s" : "", server->folder);
        while (1) {
                unsigned percent = n * 100 / total;
                int prev_len;