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