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

Re: BUG: git log: fatal: internal error in diff-resolve-rename-copy

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Aug 13, 2010, 17:53 UTC
Message-ID
<AANLkTinSUy9pDtsJizmQTTOsMOVEQ=7+U5Ri4=-RZmB-@mail.gmail.com>
In-Reply-To
<7vhbiyl8ji.fsf@alter.siamese.dyndns.org>
On Fri, Aug 13, 2010 at 10:36 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
>
> Another potential "funny" is this (unrelated to the reported issue).
>
> The "--follow" logic is called from diff_tree_sha1() function, but the
> input trees to diff_tree_sha1() are not necessarily the top-level trees
> (compare_tree_entry() calls it while it recursively descends into
> subtrees).  For example, with the example Constantine gave us, the first
> "try-to-follow-renames" call happens with the "base" set to "platform/"
> but the rename source is actually "lang-api/src/com/intellij/..."
> hierarchy, so it is a wasted call.  I think we only want to run the rename
> following at the very top level, i.e. like the attached patch.
>
> Linus, what do you think?  Am I missing something obvious?

I think you're right. You're certainly not missing anythng _obvious_. Iirc the only reason I put that 'follow' hack in diff_tree_sha1() was because that way I didn't need to worry about all the callers, but I didn't even think about the whole recursion issue.

So ack on that.
                Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 16 in “BUG: git log: fatal: internal error in diff-resolve-rename-copy”
  1. Constantine PlotnikovAug 13, 2010
  2. Ævar Arnfjörð BjarmasonAug 13, 2010
  3. Junio C HamanoAug 13, 2010
  4. Linus TorvaldsAug 13, 2010
  5. Junio C HamanoAug 13, 2010
  6. diff --follow: do call diffcore_std() as necessaryJunio C Hamano, Aug 13, 2010
  7. Ævar Arnfjörð BjarmasonAug 13, 2010
  8. Junio C HamanoAug 13, 2010
  9. log: test for regression introduced in v1.7.2-rc0~103^2~2Ævar Arnfjörð Bjarmason, Aug 14, 2010
  10. Ævar Arnfjörð BjarmasonAug 14, 2010
  11. Junio C HamanoAug 15, 2010
  12. Ævar Arnfjörð BjarmasonAug 15, 2010
  13. Junio C HamanoAug 16, 2010
  14. Ævar Arnfjörð BjarmasonAug 16, 2010
  15. log: test for regression introduced in v1.7.2-rc0~103^2~2Ævar Arnfjörð Bjarmason, Aug 15, 2010
  16. Constantine PlotnikovAug 17, 2010

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.