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

Re: [PATCH] read-tree --aggressive

From
Junio C Hamano <junkio@cox.net>
Date
Feb 4, 2006, 12:56 UTC
Message-ID
<7v4q3fxoym.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7v8xsr60n2.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> This patch would not help recursive strategy, though.  Calling
> read-tree with --aggressive flag essentially disables the
> benefit we would expect to get from it -- rename detection.

I think we could fairly easily tweak this by trying at least half of the rename detection inside read-tree. That would make it usable by merge-recursive as well.

Instead of doing "aggressive" in the threeway_merge function first, we can process the stages without it in the first pass, and run an equivalent of diff-stages -M internally between stage #2 and stage #3, and keep the matched paths unmerged (we need to mark these paths somehow). After that, we can do "aggressive" collapsing to reduce the amount of trivial merges that recursive does not have to look at for renaming merges.

If we are ambitious, we could go further. We could actually move the stages around after running the rename detection diff between stages #2 and #3, along with working tree files as needed. Then merge-resolve would be able to do the renaming merge similar to merge-recursive.

Previous: Peter Eriksen
Message 11 of 11 in “Bottlenecks in git merge”
  1. Peter EriksenJan 31, 2006
  2. Junio C HamanoJan 31, 2006
  3. Petr BaudisJan 31, 2006
  4. Junio C HamanoFeb 1, 2006
  5. Linus TorvaldsJan 31, 2006
  6. Petr BaudisFeb 1, 2006
  7. Linus TorvaldsFeb 1, 2006
  8. Petr BaudisJan 31, 2006
  9. read-tree --aggressiveJunio C Hamano, Feb 4, 2006
  10. Peter EriksenFeb 4, 2006
  11. Junio C HamanoFeb 4, 2006

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.