git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-email: restore --in-reply-to superseding behavior

From
Rafael Aquini <aquini@redhat.com>
Date
Jun 26, 2020, 13:39 UTC
Message-ID
<20200626133947.GB2235017@optiplex-lnx>
In-Reply-To
<CAPUEspgoDUGUmFqoKkmKDpRzSB5dQNb+PasaPjbPwb04SBz=Ww@mail.gmail.com>
On Thu, Jun 25, 2020 at 06:08:24PM -0700, Carlo Arenas wrote:
Show 10 quoted lines
> a test case in t/t9001-send-email.sh will also help, as I am not sure
> this might be "expected behaviour" as hinted in the man page for
> git-send-email (under --thread):
> 
> "It is up to the user to ensure that no In-Reply-To header already exists
>   exists when git send-email is asked to add it (especially note that
>   git format-patch can be configured to do the threading itself).
>   Failure to do so may not produce the expected result in the
>   recipient's MUA."
>

A quick note: this change does not break that assumption, as well. The "ensure it exists" part means the header must either be in the messages, as populated by format-patch, or it is provided by the --in-reply-to switch option. send-email --thread is not orthogonal, but complementar with --in-reply-to, AFAICS.

The problem we have, right now, is that "send-email --in-reply-to" input gets dropped on the floor if you don't explicitly do "format-patch --no-thread" (or extract a single patch), and this is a behavior regression introduced after v2.17.2

I took a glance in the test-cases, an it seems this is already covered:
test_expect_success $PREREQ 'in-reply-to but no threading' '
        git send-email \
                --dry-run \
                --from="Example <nobody@example.com>" \
                --to=nobody@example.com \
                --in-reply-to="<in-reply-id@example.com>" \
                --no-thread \
                $patches >out &&
        grep "In-Reply-To: <in-reply-id@example.com>" out
'

Cheers, -- Rafael

Previous: Carlo ArenasNext: Rafael Aquini
Message 6 of 8 in “send-email: restore --in-reply-to superseding behavior”
  1. send-email: restore --in-reply-to superseding behaviorRafael Aquini, Jun 24, 2020
  2. Junio C HamanoJun 24, 2020
  3. Rafael AquiniJun 24, 2020
  4. Rafael AquiniJun 25, 2020
  5. Carlo ArenasJun 26, 2020
  6. Rafael AquiniJun 26, 2020
  7. send-email: restore --in-reply-to superseding behaviorRafael Aquini, Jun 29, 2020
  8. Carlo Marcelo Arenas BelónJul 1, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.