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

Re: [PATCH 1/1] git-apply: Allow simultaneous --cached and --3way options

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2021, 00:10 UTC
Message-ID
<xmqqblas46ja.fsf@gitster.g>
In-Reply-To
<CAMKO5CuYE1VA2h2zDo-b77WQDgj1LriwifruziPA30Yb7uS=6A@mail.gmail.com>
Jerry Zhang <jerry@skydio.com> writes:
> Unrelatedly would you have context on why --3way falls back on 3way
> rather than trying 3way first then falling back on apply_fragments if
> blobs don't exist?

Historical accident, following the order in which these features were invented, plus applying a single patch straight has been faster than doing a 3-way.

I tend to agree with what you are hinting at, though, as I do not offhand think of a situation in which a successful 3way merge would be less correct than a straight patch application, and if the user explicitly has told us to do "--3way", that is a sign that it is acceptable to try 3way first even if it costs more cycles.

Those who has been giving "--3way" from inertia would notice if the performance difference is large enough and may complain, though.

Previous: Jerry ZhangNext: Jerry Zhang
Message 9 of 29 in “git-apply: Allow simultaneous --cached and --3way options”
  1. 0/1 git-apply: Allow simultaneous --cached and --3way optionsJerry Zhang, Apr 3, 2021
  2. 1/1 git-apply: Allow simultaneous --cached and --3way optionsJerry Zhang, Apr 3, 2021
  3. Elijah NewrenApr 3, 2021
  4. Junio C HamanoApr 3, 2021
  5. Junio C HamanoApr 4, 2021
  6. Jerry ZhangApr 5, 2021
  7. Junio C HamanoApr 5, 2021
  8. Jerry ZhangApr 5, 2021
  9. Junio C HamanoApr 6, 2021
  10. Jerry ZhangApr 5, 2021
  11. git-apply: Allow simultaneous --cached and --3way optionsJerry Zhang, Apr 5, 2021
  12. Junio C HamanoApr 5, 2021
  13. Jerry ZhangApr 6, 2021
  14. Junio C HamanoApr 6, 2021
  15. Jerry ZhangApr 6, 2021
  16. Jerry ZhangApr 7, 2021
  17. git-apply: allow simultaneous --cached and --3way optionsJerry Zhang, Apr 6, 2021
  18. git-apply: allow simultaneous --cached and --3way optionsJerry Zhang, Apr 7, 2021
  19. Junio C HamanoApr 7, 2021
  20. git-apply: allow simultaneous --cached and --3way optionsJerry Zhang, Apr 8, 2021
  21. Junio C HamanoApr 8, 2021
  22. Elijah NewrenApr 12, 2021
  23. Junio C HamanoApr 12, 2021
  24. Elijah NewrenApr 12, 2021
  25. Junio C HamanoApr 12, 2021
  26. Elijah NewrenApr 3, 2021
  27. Jerry ZhangApr 5, 2021
  28. Bagas SanjayaApr 3, 2021
  29. Bagas SanjayaApr 3, 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.