notmuch-extract-patch(1)

πŸ“¦
version 31 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– notmuch-extract-patch β€” the manual page, bestie edition πŸ’–

okay so this is the notmuch-extract-patch(1) man page, straight from User Commands, and we're gonna go through the whole thing together, no skimming, no skipping, i promise 🫢


✨ NAME ✨

notmuch-extract-patch β€” literally just extracts a git patch series out of notmuch. that's the whole job. iconic.


🌸 SYNOPSIS 🌸

notmuch-extract-patch [mbox-extract-patch(1) options] [--] QUERY

so you give it a QUERY, you can pass any mbox-extract-patch(1) options through, and if you need to, you slap a -- in there before your query. simple. clean. slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so notmuch-extract-patch is a wrapper around mbox-extract-patch(1), and what it does is pull a whole series of git patches out of your notmuch database. it's built for patches that were originally sent with git-send-email(1), iykyk.

and here's the best part: it skips cover letters and it skips replies/reviews in its output. so you don't have to scroll past a thousand "thanks, looks good to me!" emails. the way it just filters all that out... obsessed. πŸ’…


🌈 EXAMPLE 🌈

this is the whole vibe:

% git checkout -b test-feature
% notmuch-extract-patch thread:000000000000265f | git am

branch, extract, git am, done. main character energy fr fr ✨


πŸ’€ LIMITATIONS πŸ’€

ngl, there are some. let's be real about them.

  • we inherit the limitations of mbox-extract-patch(1). that's just how it is bestie.
  • notmuch-extract-patch can pick which patches to extract based on the reroll count (peep the -v option in mbox-extract-patch(1) for that one), but other than that, typical usage just assumes there's only one patch series in a thread. one. singular. that's the assumption.
  • and if that assumption gets violated?? 😭 you'd have to hand-construct a notmuch query that includes only the patches you actually want to extract β€” which kind of defeats the whole purpose of having this script in the first place. tragic, honestly.

πŸŽ€ SEE ALSO πŸŽ€

go check these out:


πŸ’œ AUTHOR πŸ’œ

Sean Whitton <spwhitton@spwhitton.name>

it's a rewrite, with additional features, of a script by Aurelien Aptel. giving credit where credit is due, always πŸ’–


and that's the whole page, bestie πŸŽ€ this was perl v5.40.1 from the Debian Project, bringing you notmuch-extract-patch(1) β€” go extract some patches, you've got this πŸ’…βœ¨

πŸ“¦ where this page comes from