git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2025, 07:22 UTC
Message-ID
<xmqqzf7x75pz.fsf@gitster.g>
In-Reply-To
<db513191-5f3d-489e-b91a-a788f70b9e8c@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
> 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 do not think that is the case, either. diff.suppressBlankEmpty is part of Git for quite some time. The "empty context lines can be expressed as a totally empty line" was started at GNU IIRC, but I think POSIX allows it these days. And we can take it, as you found out with your "bla.patch" experiment below.

Show 21 quoted lines
> 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?
So the reason you seek is because you are barking up a wrong tree?

There probably is something wrong in the patch text that has nothing to do with diff.suppressBlankEmpty that you somehow "fixed" without knowing when you massaged the e-mail message into the "bla.patch" text yourself manually, if I have to guess.

Previous: Johannes Sixt
Message 8 of 8 in “gitk: fix history window panes position”
  1. gitk: fix history window panes positiontobias.boesch@miele.com, Dec 2, 2025
  2. AW: [PATCH] gitk: fix history window panes positiontobias.boesch@miele.com, Dec 3, 2025
  3. Johannes SixtDec 3, 2025
  4. AW: [PATCH] gitk: fix history window panes positiontobias.boesch@miele.com, Dec 4, 2025
  5. Johannes SixtDec 4, 2025
  6. Junio C HamanoDec 5, 2025
  7. Johannes SixtDec 5, 2025
  8. Junio C HamanoDec 5, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.