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

git send-email --notmuch expr

From
Jed Brown <jed@59a2.org>
Date
Nov 25, 2009, 02:49 UTC
Message-ID
<87d4375ne0.fsf@59A2.org>

Notmuch is a new mail system with fast indexing and tagging, see notmuchmail.org. It has a command-line tool to build replies to emails, and I wrote a patch to format-patch that enables

  git format-patch --notmuch EXPR

where EXPR is any notmuch query, but usually id:<Message-ID> to match a specific message. This will set up several headers, notably In-Reply-To, References, To, Cc, Bcc. This works great, and the the patch follows this message.

But I really want
  git send-email --notmuch EXPR

This sort-of works, but the interactive part prompts for the various headers (even though format-patch supplies them), and then duplicates the To header (both the possibly empty field the user provided, plus the one coming from format-patch). I had a brief look at git-send-email.perl, and I'm a little confused.

	} elsif (/^(?:To|Cc|Bcc):/i) {
		print "To/Cc/Bcc fields are not interpreted yet, they have been ignored\n";
		next;
	}

This regex doesn't match these headers (is the leading ?: a typo?) so there is no warning. But it's important that these headers *not* be ignored, getting them set automatically is a key feature of the --notmuch option. I'm having trouble discerning whether I would cause problems by just using these headers coming out of format-patch. Presumably there was a reason why they were (intended to be) explicitly ignored, and my poor perl skills are not helping. Could someone enlighten me?

Jed
Next: Jed Brown
Message 1 of 5 in “git send-email --notmuch expr”
  1. Jed BrownNov 25, 2009
  2. 1/2 Added the --notmuch option to git format-patch.Jed Brown, Nov 25, 2009
  3. 2/2 Documentation for format-patch --notmuch.Jed Brown, Nov 25, 2009
  4. Jakub NarebskiNov 25, 2009
  5. Jed BrownNov 25, 2009

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.