* Some mutt(1) patches and scripts
@ 2018-04-22 20:58 Taylor Blau
0 siblings, 0 replies; only message in thread
From: Taylor Blau @ 2018-04-22 20:58 UTC (permalink / raw)
To: git
Hi,
I have spent more time contributing to the Git list lately, and as such
have grown a number of patches and scripts that have been useful for my
workflow. I am interested in sharing them here in the hopes that they
will be useful for others as well :-).
My workflow is as follows:
1. Write some commits.
2. Prepare them with 'git mail' (a wrapper over 'git-format-patch(1)').
3. Edit the cover letter template, and look them over in Mutt before
sending them to the list.
I suspect that (2) and (3) are somewhat unconventional. My 'git mail'
script, in particular, has been useful to me. The contents looks
(basically) as follows [1]:
mbox=$(mktemp)
git format-patch --stdout $@ >"$mbox" && mutt -f "$mbox"
This has been useful in not having to move around many *.patch files in
an out of a directory. I enjoy looking at a series as a thread in
mutt(1) rather than as individual files in $EDITOR.
Mutt is not particularly keen to resend email so I have had to teach it
a few tricks:
1. Macros "b" and "B" to resend and force-resend the highlighted
message. [2]
macro index,pager b ":set edit_headers=yes<enter><resend-message>:set edit_headers=no<enter>"
macro index,pager B ":set editor=true<enter><resend-message><send-message>:set editor=$EDITOR<enter>"
2. A patch to not destroy the original Message-ID header when
resending email. Mutt (sensibly) does this by default, but it is
not suitable for my workflow, as when I edit the cover letter
template the Message-ID changes and subsequent patches are sent in
response to a non-existent message.
I have patched Mutt to remove this behavior, and (since I work on
macOS) set up a Homebrew tap to install mutt with
`--with-retain-messageid'. [3]
Thanks,
Taylor
[1]: https://github.com/ttaylorr/dotfiles/blob/work-gh/bin/git-mail
[2]: https://github.com/ttaylorr/dotfiles/blob/work-gh/mutt/.muttrc#L43-L44
[3]: https://github.com/ttaylorr/homebrew-mutt
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-22 20:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-22 20:58 Some mutt(1) patches and scripts Taylor Blau
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).