~rjarry/aerc-discuss

2 2

Saving an mbox patch

Details
Message ID
<CZVRAMDQ5UHV.9250EMQYNJ0D@disroot.org>
DKIM signature
pass
Download raw message
Hi list, I'm trying to apply a patch received via email. I generated
this patch myself with git format-patch, and executing `git am' on the
patch exported with :save yields an error "patch format detection
failed".

The patch does not include From or Subject headers so I assumed I had
to save the patch with headers received with the email. Showing mail
headers with :toggle-headers and then using :save does not save the
mail with headers at the top, nor can I find anything about saving
messages with headers in the documentation for :save in aerc(1).

Saving the patch plainly with :save does not preserve the email's
subject, author, or date. How can I save a patch to include this
information in the file, so that git am is able to apply it?

Thanks,

 ~Jeremy
Details
Message ID
<83ae8df9-7bdf-4560-9a46-48e8a7bca16e@ferdinandy.com>
In-Reply-To
<CZVRAMDQ5UHV.9250EMQYNJ0D@disroot.org> (view parent)
DKIM signature
missing
Download raw message
2024. márc. 17. 5:56:32 Jeremy Baxter <jtbx@disroot.org>:

> Hi list, I'm trying to apply a patch received via email. I generated
> this patch myself with git format-patch, and executing `git am' on the
> patch exported with :save yields an error "patch format detection
> failed".
>
> The patch does not include From or Subject headers so I assumed I had
> to save the patch with headers received with the email. Showing mail
> headers with :toggle-headers and then using :save does not save the
> mail with headers at the top, nor can I find anything about saving
> messages with headers in the documentation for :save in aerc(1).
>
> Saving the patch plainly with :save does not preserve the email's
> subject, author, or date. How can I save a patch to include this
> information in the file, so that git am is able to apply it?

Save only saves the particular part, not the email. You either want

:pipe -m git am -3

to apply it directly or pipe -m to tee to save the whole message, or 
better yet, take a look at man aerc-patch.

Best,
Bence


> Thanks,
>
> ~Jeremy
Details
Message ID
<CZVU7PB1QSYD.25SAL8IR0TWZ0@disroot.org>
In-Reply-To
<83ae8df9-7bdf-4560-9a46-48e8a7bca16e@ferdinandy.com> (view parent)
DKIM signature
pass
Download raw message
On Sun Mar 17, 2024 at 7:59 PM NZDT, Bence Ferdinandy wrote:
> Save only saves the particular part, not the email. You either want
>
> :pipe -m git am -3
>
> to apply it directly or pipe -m to tee to save the whole message, or 
> better yet, take a look at man aerc-patch.

Thanks, pipe is what I'm looking for.

aerc-patch seems pretty interesting as well, thanks a lot!

 ~Jeremy
Reply to thread Export thread (mbox)