0

I am trying to understand how to use git send-email to send interleaved replies.

As an example, suppose there is Alice, who would like to send a patch to Bob, with the patch being:

From f1cd1338d846b9e2c84171b46505d20d4e15831b Mon Sep 17 00:00:00 2001
From: Alice <alice@some_mail.org>
Date: Sun, 30 Jun 2024 15:42:02 +0530
Subject: [PATCH] This is commit number 1

Create a sample file for a stack overflow question.

Signed-off-by: Alice <alice@some_mail.org>
---
 my_file.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 my_file.txt

diff --git a/my_file.txt b/my_file.txt
new file mode 100644
index 0000000..b6cedf8
--- /dev/null
+++ b/my_file.txt
@@ -0,0 +1 @@
+A sampel file
--
2.25.1

Assuming the patch is stored in a file named 0001-This-is-commit-number-1.patch, Alice would use the following command to send it using git send-email:

$ git send-email --to="bob@some_mail.org" ./0001-This-is-commit-number-1.patch
Message-Id: <20220630101930.16628-1-alice@some_mail.org>

The next day, Bob opens up his inbox and find's Alice's email. Bob would like to reply to the above e-mail in an interleaved style, asking Alice to fix a typo in the commit file:

> Create a sample file for a stack overflow question.
> 
> Signed-off-by: Alice <alice@some_mail.org>
> ---
>  my_file.txt | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 100644 my_file.txt
> 
> diff --git a/my_file.txt b/my_file.txt
> new file mode 100644
> index 0000000..b6cedf8
> --- /dev/null
> +++ b/my_file.txt
> @@ -0,0 +1 @@
> +A sampel file
nit: Change "sampel" to "sample". 

The patch looks good otherwise!

As per my understanding, to send the above interleaved reply, Bob will need to:

  1. Somehow download Alice's e-mail (that is currently in his inbox) to his computer.
  2. Quote the part of Alice's e-mail that contains the typo (lines that begin with > are quoted)
  3. Write his comments to fix the typo.
  4. Finally send the e-mail as a reply to Alice using the Message-Id that is visible when Alice had sent the e-mail.

(Above steps are what I think would be required to send the reply, so they could be wrong too!)

How can Bob use git send-email to send the interleaved reply to Alice?

5
  • git send-email is intended to send a collection of patches as emails. It's not a generic email client. Why do you want to subvert it to send replies?
    – phd
    Commented Jun 30 at 11:26
  • Oh, my bad then! I was looking at a few commits in the kernel (e.g.: lore.kernel.org/lkml/…), and thought that it is git send-email that is also being used to send replies. Commented Jun 30 at 11:30
  • 1
    I'm sure they use all kinds of full-blown email clients — command line, TUI, GUI, whatever… :-)
    – phd
    Commented Jun 30 at 11:33
  • 1
    Oh interesting! I quickly searched and maybe they are using some of these clients? kernel.org/doc/html/latest/process/email-clients.html Commented Jun 30 at 11:36
  • "kernel.org/doc/html/latest/process/email-clients.html" It seems the page lists most modern popular TUI and GUI email clients, and some retired (like pine). The page doesn't mention command-line clients like mail and mailx; perhaps they lost favor even among Unix diehards. :-)
    – phd
    Commented Jun 30 at 11:45

0

Browse other questions tagged or ask your own question.