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

[RFC] git am: apply patches directly via message id

From
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Date
Mar 19, 2026, 09:23 UTC
Message-ID
<20260319092441.1283001-1-shreyanshpaliwalcmsmn@gmail.com>
Hi,

Currently, git am supports applying patches through several methods, mbox files, .patch files, maildir directories etc. However, all of these require the user to first obtain the patch file locally before applying it. I was thinking that it would be a lot more convinient to directly apply patches by by their message id of emails, without any manual downloading by the help of a new option '--fetch-mid'. It would something be like,

        git am --fetch-mid "foo1@bar" "foo2@bar"
We can fetch the patch/es from the standard url format like,
        `https://lore.kernel.org/git/<message-id>/raw`

We can also make the base URL configurable via a new config key am.publicInboxUrl, defaulting to https://lore.kernel.org, so that users on private setups can point it at their own public-inbox instance. The fetched content is already in mbox format, so the patch application logic won't need any change. A further addition to this can be to just provide the message id of the cover letter of patch and automatically it would fetch all the patches.

Does this sound like a useful feature to add or maybe any kind of indirect implementation is already there and I am missing anything. Let me know what are your thoughts on this.

Best, Shreyansh

Next: Junio C Hamano
Message 1 of 5 in “[RFC] git am: apply patches directly via message id”
  1. Shreyansh PaliwalMar 19, 2026
  2. Junio C HamanoMar 19, 2026
  3. Shreyansh PaliwalMar 19, 2026
  4. Junio C HamanoMar 19, 2026
  5. Shreyansh PaliwalMar 19, 2026

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.