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

Re: [PATCH] Allow combined diff to ignore white-spaces

From
Antoine Pelisse <apelisse@gmail.com>
Date
Mar 4, 2013, 18:50 UTC
Message-ID
<CALWbr2xPJQ1tvyT6Q84ccn=k6fg8A1aUbJG7FQjjJGZGC5voGg@mail.gmail.com>
In-Reply-To
<7vy5e3vwos.fsf@alter.siamese.dyndns.org>
On Mon, Mar 4, 2013 at 7:36 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Antoine Pelisse <apelisse@gmail.com> writes:
>
>> It feels incorrect to me to coalsesce "- 5" and "-  5" as it might
>> look incorrect to the user. But still the idea is appealing.
>
> The users already need to see that when reading a regular patch with
> one or more context lines and -b/-w/etc., anyway.  The context lines
> are made into context only because whitespace differences were
> ignored, and in the regular unified patch format we can show only
> one version, either from preimage or from postimage, and have to
> pick one.  Coalescing "- 5" and "-  5" into "--5" or "--  5" by
> picking one or the other is the same thing, no?
That's all I needed to be convinced. I obviously don't care which one we pick.
Show 7 quoted lines
>> Using the exact example you gave, and running the latest next, I have
>> this output, where 11 is not coalesced.
>> Is that a bug ?
>
> It could be tickling a corner case because the removal is at the end
> of the file.  Perhaps adding 12 that is all common across three
> versions and see what happens?

Doesn't make a difference. Still have "- 11" and " -11". I will try to have a look at it.

Previous: Junio C HamanoNext: Antoine Pelisse
Message 5 of 13 in “Allow combined diff to ignore white-spaces”
  1. Allow combined diff to ignore white-spacesAntoine Pelisse, Mar 2, 2013
  2. Junio C HamanoMar 3, 2013
  3. Antoine PelisseMar 4, 2013
  4. Junio C HamanoMar 4, 2013
  5. Antoine PelisseMar 4, 2013
  6. Allow combined diff to ignore white-spacesAntoine Pelisse, Mar 13, 2013
  7. Junio C HamanoMar 13, 2013
  8. Junio C HamanoMar 13, 2013
  9. Johannes SixtMar 14, 2013
  10. Junio C HamanoMar 14, 2013
  11. Antoine PelisseMar 14, 2013
  12. Allow combined diff to ignore white-spacesAntoine Pelisse, Mar 14, 2013
  13. Junio C HamanoMar 14, 2013

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.