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

Re: [PATCH] ll-merge: teach ll_binary_merge() a trivial three-way merge

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2021, 01:06 UTC
Message-ID
<xmqqczr26i9f.fsf@gitster.g>
In-Reply-To
<CABPp-BFh3uV9-X8iaKHA771TUneBDYmOKU5+5y9XsE-11UL7tQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 5 quoted lines
> It appears that try_threeway() in apply.c is already computing the
> OIDs of the blobs involved, so it looks like the full content
> comparison is unnecessary even in the apply --3way case.  If we moved
> the trivial-merge check to that function, it could just compare the
> OIDs rather than comparing the full content.

Yeah, if we trust merge backends and only fix "apply --3way" codepath, which I actually am OK with, I agree that it would be vastly simpler and nicer to do it in try_threeway().

Thanks.
Previous: Elijah NewrenNext: Junio C Hamano
Message 6 of 16 in “git-apply: fix --3way with binary patch”
  1. git-apply: fix --3way with binary patchJerry Zhang, Jul 28, 2021
  2. Junio C HamanoJul 28, 2021
  3. Junio C HamanoJul 28, 2021
  4. ll-merge: teach ll_binary_merge() a trivial three-way mergeJunio C Hamano, Jul 28, 2021
  5. Elijah NewrenJul 28, 2021
  6. Junio C HamanoJul 29, 2021
  7. apply: resolve trivial merge without hitting ll-merge with "--3way"Junio C Hamano, Sep 5, 2021
  8. Elijah NewrenSep 6, 2021
  9. Ævar Arnfjörð BjarmasonSep 6, 2021
  10. Junio C HamanoSep 7, 2021
  11. Junio C HamanoSep 7, 2021
  12. Jerry ZhangJul 28, 2021
  13. Jerry ZhangJul 28, 2021
  14. Junio C HamanoJul 28, 2021
  15. Jerry ZhangJul 28, 2021
  16. Junio C HamanoJul 28, 2021

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.