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:
- Somehow download Alice's e-mail (that is currently in his inbox) to his computer.
- Quote the part of Alice's e-mail that contains the typo (lines that begin with
>
are quoted) - Write his comments to fix the typo.
- 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?
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?git send-email
that is also being used to send replies.pine
). The page doesn't mention command-line clients likemail
andmailx
; perhaps they lost favor even among Unix diehards. :-)