Re: patch submission process, was Re: [PATCH v6 06/16] merge_recursive: abort properly upon errors
- From
Jeff King <peff@peff.net>
- Date
- Aug 9, 2016, 18:55 UTC
- Message-ID
- <20160809185505.fjrbid4rxatxrqfl@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8ARtg5KUceogNaeB+Fgh-u-TxfkAWdOk68_sEA-c0y6vg@mail.gmail.com>
On Tue, Aug 09, 2016 at 08:43:59PM +0200, Duy Nguyen wrote:
Show 7 quoted lines
> On Tue, Aug 9, 2016 at 1:37 PM, Jeff King <peff@peff.net> wrote: > > That's (relatively) easy for me to script via mutt (grab > > these patches, apply them). > > Could you share your mutt set up pleaaase? I've been wanting this for > a long time, but never used mutt long enough to bother with a proper > setup like this (I blame gmail).
It's actually pretty simple. The relevant config from my .muttrc is:
macro pager,index D '<shell-escape>rm -f $HOME/patch<enter>' macro pager,index A '<copy-message>~/patch<enter><enter>'
I use "~/patch" as a rendezvous point, and then "git am ~/patch" from my other terminal. That avoids mutt having to know which repo to apply to, and keeps the "am" process in its own terminal (which is handy if it runs into conflicts, for example).
So generally I would "D" to clear out the contents of ~/patch, and then "A" whichever patches I want to apply. I often use mutt's aggregate selection for that. My bindings are:
bind index \; tag-pattern bind index a tag-prefix
which I think come from pine (which I used for many years before switching to mutt probably 15 years ago). I don't recall the default keybindings.
Anyway, you can either tag using a pattern (with ";"), or tag mails individually (using "t", the default), and then "a-A" to apply the "A" to all of them (if you are in the habit of tagging all of them and then doing "A" in one swoop, you could also get rid of the separate "D" command and just make "A" imply it).
-Peff