Re: [PATCH] gitk: fix history window panes position

2 messages, 2 authors, 2025-12-05 · open the first message on its own page

Re: [PATCH] gitk: fix history window panes position

From: Junio C Hamano <hidden>
Date: 2025-12-05 02:23:13

Johannes Sixt [off-list ref] writes:
BTW, the email that I received was not usable for git-am because its
body was base64-encoded. I had to copy the text from my MUA to a text
file before I could apply it with git-am. If you have trouble sending
out unencoded, raw text mails, please use Gitgitgadget if there is more
than one patch in the series.
"git am" (actually "git mailsplit" that is called from it to extract
what can be used by "git apply") should be able to deal with

    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: base64

so there may be something else going on.  The rendition at lore

https://lore.kernel.org/git/AM0PR08MB5426BC141388A69BB5087732E1D8A@AM0PR08MB5426.eurprd08.prod.outlook.com/

seems to show that it has in-body headers that should have been
moved to e-mail headers, but otherwise it looks more or less like
legit patch e-mail without anything unusual.  It could be the patch
may be full of ^M, but we cannot tell from the way lore/public-inbox
shows its messages.

Re: [PATCH] gitk: fix history window panes position

From: Johannes Sixt <hidden>
Date: 2025-12-05 06:40:11

Am 05.12.25 um 03:23 schrieb Junio C Hamano:
"git am" (actually "git mailsplit" that is called from it to extract
what can be used by "git apply") should be able to deal with

    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: base64

so there may be something else going on.
Ah! You are absolutely right! Clearly, I wasn't fully taking in what
git-am was telling me. The problem isn't the encoding. It's the patch
text itself, in particular, the single SP needed for empty context lines
is missing.

I get this error when I apply the mbox containing the complete email:

$ git am -3 --signoff ~/Mail/ambox
warning: quoted CRLF detected
Applying: gitk: fix history window panes position
error: corrupt patch at line 40
error: could not build fake ancestor
Patch failed at 0001 gitk: fix history window panes position
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: [...]

But it is OK to copy the email body text to a file (which looks like
mbox text) and apply that, despite the missing SP:

$ git am -3 --signoff bla.patch
Applying: gitk: fix history window panes position
Using index info to reconstruct a base tree...
A       gitk-git/gitk
Falling back to patching base and 3-way merge...

Why is that?

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help