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

Re: git merge -s subtree seems to be broken.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 31, 2018, 15:53 UTC
Message-ID
<xmqqtvofcsgc.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAF1Ko+FNfjWMteccfKDBjPEW76rGBLQkGb1icUHmzEZ0fKQJBA@mail.gmail.com>
George Shammas <georgyo@gmail.com> writes:
> Bisecting around, this might be the commit that introduced the breakage.
>
> https://github.com/git/git/commit/d8febde

Interesting. I've never used the "-s subtree" strategy without "-Xsubtree=..." to explicitly tell where the thing should go for a long time, so I am not surprised if I did not notice if an update to the heuristics made long time ago had affected tree matching.

d8febde3 ("match-trees: simplify score_trees() using tree_entry()", 2013-03-24) does touch the area that may affect the subtree matching behaviour.

Because it is an update to heuristics, and as such, we need to be careful when saying it is or is not "broken". Some heuristics may work better with your particular case, and may do worse with other cases.

But from the log message description, it looks like it was meant to be a no-op simplification rewrite that should not affect the outcome, so it is a bit surprising.

Previous: René ScharfeNext: George Shammas
Message 6 of 17 in “git merge -s subtree seems to be broken.”
  1. George ShammasJul 31, 2018
  2. George ShammasJul 31, 2018
  3. Jeff KingJul 31, 2018
  4. Junio C HamanoJul 31, 2018
  5. René ScharfeAug 1, 2018
  6. Junio C HamanoJul 31, 2018
  7. George ShammasJul 31, 2018
  8. Jeff KingJul 31, 2018
  9. Junio C HamanoJul 31, 2018
  10. Jeff KingJul 31, 2018
  11. Jeff KingJul 31, 2018
  12. George ShammasJul 31, 2018
  13. Jeff KingJul 31, 2018
  14. Junio C HamanoJul 31, 2018
  15. René ScharfeAug 1, 2018
  16. Jeff KingAug 2, 2018
  17. Jeff KingAug 2, 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.