Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail

Subject: Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail

Date: Thu, 02 Jun 2022 08:12:40 -0300

To: Damien Cassou, notmuch@notmuchmail.org

Cc:

From: David Bremner


Damien Cassou <damien@cassou.me> writes:

> Hi David,
>
> Can you please explain me what in git-send-email makes it easier to
> apply the patches?  I'm also interested in your process to apply
> patches from your mua (notmuch in Emacs hopefully) to your git
> repository.

There are some convenient tools for applying patches from notmuch in
Sean Whitton's mailscripts collection [1]. I tend to work in the shell
with some git aliases.

        [alias]
                nmam = "!f() { notmuch extract-patch $1 | git am -; }; f"

        [alias]
                nmam8 = "!f() { notmuch extract-patch $1 | email-to-8bit |  git am -; }; f"

        [alias]
                nmam3 = "!f() { notmuch extract-patch $1 | git am -3 -; }; f"
                
I use "c i" to copy the message id, and then paste it into a command
line
        $ git nmam <paste id here>

email-to-8bit is a little hack to work around mailman induced damage to
patches; it seems less needed with new versions of git.

notmuch-extract-patch is from mailscripts, and it fails (well, fails to
extract any patch) with attached
patches. I used to use

         notmuch show --format=raw

in place of "notmuch extract-patch". This succeeds in extracting a
patch, but smashes the body text together with the commit message in the
resulting commit.

>> [ about emacs git commit messages ]

> I think it focuses too much on what has changed
> (something that could be inferred from the patch with a little tooling)
> instead of why the code has changed this way (something only the author
> can tell).

Exactly.


[1]: https://git.spwhitton.name/mailscripts
     also available in e.g. Debian.

email-to-8bit (application/octet-stream)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: