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

Re: [PATCH] git-imap-send bugfix: Allow lines starting with "From " in body

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Mar 22, 2010, 02:37 UTC
Message-ID
<f3271551003211937p37d37816wacfe67faacb09add@mail.gmail.com>
In-Reply-To
<7vwrx5gwjz.fsf@alter.siamese.dyndns.org>
[Culling mike@codeweavers.com from CC]
Show 6 quoted lines
> As "git help imap-send" clearly says that this command is intended to be
> used on output from format-patch (but it actually does not say "and
> nothing else", which it should for your patch to make sense), I think the
> code is allowed to assume _some_ fixed order of the header fields.  It
> would break people's existing abuse to use imap-send to stuff random
> pieces of messages in mbox to their IMAP server, though.

Yes, it would. Don't you think the bug it fixes justifies the break? Perhaps we should mention in the documentation that it accepts mailboxes where emails must have those three mandatory fields in that order?

> But does format-patch _always_ start each message with these and only with
> these fields in this order?  Where would Message-Id:, References:, and Cc:
> come when the user told format-patch to add them?

Yes. From, Date, and Subject are the minimum set of fields for any general patch produced by git-format-patch, and they always appear in that order. For example, see this header:

From 20f0cf89fb9508f9e5197a3cf47a872053d4941d Mon Sep 17 00:00:00 2001
Message-Id: <20f0cf89fb9508f9e5197a3cf47a872053d4941d.1269224757.git.artagnon@gmail.com>
In-Reply-To: <42ef3f8cebd4d34e24b1544036cd48f56110c2d4.1269224756.git.artagnon@gmail.com>
References: <13132>
	<42ef3f8cebd4d34e24b1544036cd48f56110c2d4.1269224756.git.artagnon@gmail.com>
From: Ramkumar Ramachandra <artagnon@gmail.com>
Date: Sun, 21 Mar 2010 23:58:25 +0530
Subject: [PATCH 2/2] git-imap-send bugfix: Allow lines starting with
"From " in body
Cc: gitster@pobox.com

Thanks, Ramkumar

Previous: Junio C Hamano
Message 3 of 3 in “git-imap-send bugfix: Allow lines starting with "From " in body”
  1. git-imap-send bugfix: Allow lines starting with "From " in bodyRamkumar Ramachandra, Mar 21, 2010
  2. Junio C HamanoMar 21, 2010
  3. Ramkumar RamachandraMar 22, 2010

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.