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

Re: Possible bug: identical lines added/removed in git diff

From
Stefan Beller <sbeller@google.com>
Date
Aug 30, 2018, 19:16 UTC
Message-ID
<CAGZ79kZNVw4-q9KYAi9G3axb7-Ggpc2EAK8ZxAZoPEnZvEL-DQ@mail.gmail.com>
In-Reply-To
<20180830025457.GA665@sigill.intra.peff.net>
On Wed, Aug 29, 2018 at 7:54 PM Jeff King <peff@peff.net> wrote:
Show 17 quoted lines
>
> On Wed, Aug 29, 2018 at 10:10:25PM -0400, Gabriel Holodak wrote:
>
> > > Could you cut down to a real minimal reproduction, i.e. just these 20
> > > lines or so?
> >
> > I'm working on getting down to a minimal reproduction, a few lines at
> > a time. One thing that seems strange: as I've removed lines, there are
> > a bunch of lines that don't matter. Then I'll find some lines that, if
> > removed, completely fix the issue. But the ordering for these
> > apparently important lines doesn't matter. They just have to be
> > somewhere in the file to cause the duplicated diffs.
> >
> > I'll upload again when I've figured out all the unimportant lines to remove.
>
> Yeah, I reproduced based on your initial post, but noticed that when I
> cut it down the problem went away.

Oh, I had to look further down than I did initially. Now I can reproduce it from the initial data as well.

Note that it goes away with --minimal.

I have a patch cooking (which was sent out as https://public-inbox.org/git/20180810221857.87399-1-sbeller@google.com/)

and one of the weaknesses in that patch is the lack of explanation on when the heuristic is applied as I have not fully understood it yet.

Previous: Jeff KingNext: Jeff King
Message 5 of 9 in “Possible bug: identical lines added/removed in git diff”
  1. Gabriel HolodakAug 27, 2018
  2. Stefan BellerAug 27, 2018
  3. Gabriel HolodakAug 30, 2018
  4. Jeff KingAug 30, 2018
  5. Stefan BellerAug 30, 2018
  6. Jeff KingAug 30, 2018
  7. Stefan BellerAug 30, 2018
  8. Johannes SchindelinAug 31, 2018
  9. Stefan BellerSep 1, 2018

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.