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

Re: all memory consuming `git diff-tree` bug

From
Antoine Pelisse <apelisse@gmail.com>
Date
Apr 28, 2020, 04:18 UTC
Message-ID
<CALWbr2zjL5pKrvk1pRXUKgOLE+kVKzLjR3ofUOhRruAbiVVovg@mail.gmail.com>
In-Reply-To
<20200428041010.GA2371637@coredump.intra.peff.net>
On Mon, Apr 27, 2020 at 9:10 PM Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
> Without engaging my brain to think about what this code is doing or
> whether there might be clever solutions, it really sounds like we might
> consider using this quadratic code for small cases if it produces better
> results, and then switching to the less-accurate greedy implementation
> when we need to.

I remember having the exact same thought at the time I wrote this, but my limited tests with 10k lines files were fine so I discarded it.

Falling-back on the greedy algorithm seems reasonable in that case.
Antoine
Previous: Jeff King
Message 3 of 3 in “all memory consuming `git diff-tree` bug”
  1. Dale HenrichsApr 28, 2020
  2. Jeff KingApr 28, 2020
  3. Antoine PelisseApr 28, 2020

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.