public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail•com>
To: git@vger•kernel.org
Subject: [RFC] git am: apply patches directly via message id
Date: Thu, 19 Mar 2026 14:53:36 +0530	[thread overview]
Message-ID: <20260319092441.1283001-1-shreyanshpaliwalcmsmn@gmail.com> (raw)

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

             reply	other threads:[~2026-03-19  9:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  9:23 Shreyansh Paliwal [this message]
2026-03-19 13:43 ` [RFC] git am: apply patches directly via message id Junio C Hamano
2026-03-19 15:21   ` Shreyansh Paliwal
2026-03-19 15:35     ` Junio C Hamano
2026-03-19 15:45       ` Shreyansh Paliwal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260319092441.1283001-1-shreyanshpaliwalcmsmn@gmail.com \
    --to=shreyanshpaliwalcmsmn@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox