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

Re: [PATCH] git-apply: fix --3way with binary patch

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 28, 2021, 21:01 UTC
Message-ID
<xmqqpmv2885j.fsf@gitster.g>
In-Reply-To
<CAMKO5CszNvzd6Y5VdTqw6JDGxOyQ-CNA3fxgf5ChQbGwZ9v_rw@mail.gmail.com>
Jerry Zhang <jerry@skydio.com> writes:
Show 12 quoted lines
> Well it isn't really failing right? Failing 3way would be not finding
> the object ids in the database, which would indicate a failure to
> even attempt 3way. This would result in fallback to direct application.
> What we're seeing is that 3way application results in conflicts where
> direct application would not result in conflicts. Having a conflict is
> currently not a reason for the code to fall back to direct application,
> here is the relevant line:
> "
>          try_threeway(state, &image, patch, st, ce) < 0) {
> "
> try_threeway returns 1 in case of conflict, 0 for success, and -1
> for true errors.

Yup, I know. That is why I questioned if this "< 0" is a bug in my earlier message in this exchange.

Thanks.
Previous: Jerry Zhang
Message 16 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.