git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Subject: Some mutt(1) patches and scripts
Date: Sun, 22 Apr 2018 13:58:59 -0700	[thread overview]
Message-ID: <20180422205859.GA16261@syl.local> (raw)

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

                 reply	other threads:[~2018-04-22 20:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180422205859.GA16261@syl.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).