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

Re: [PATCH 2/2] update documentation for new zdiff3 conflictStyle

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 15, 2021, 06:21 UTC
Message-ID
<xmqqr1h3veao.fsf@gitster.g>
In-Reply-To
<50e82a7a32c1cc5c1d2282f6f5b2b32a8ce7444f.1623734171.git.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> +	marker and the original text before the `=======` marker.  The
> +	"merge" style tends to produce smaller conflict regions than diff3,
> +	both because of the exclusion of the original text, and because
> +	when a subset of lines match on the two sides they are just pulled
> +	out of the conflict region.  Another alternate style, "zdiff3", is
> +	similar to diff3 but removes matching lines on the two sides from
> +	the conflict region when those matching lines appear near the
> +	beginning or ending of a conflict region.

I am not a native speaker, but contrast between "beginning" and "ending" felt funny (I usually see "beginning" vs "end").

Show 18 quoted lines
> diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
> index 3819fadac1f1..259e1ac2cf0c 100644
> --- a/Documentation/git-merge.txt
> +++ b/Documentation/git-merge.txt
> +while in "zdiff3" style, it may look like this:
> +
> +------------
> +Here are lines that are either unchanged from the common
> +ancestor, or cleanly resolved because only one side changed,
> +or cleanly resolved because both sides changed the same way.
> +<<<<<<< yours:sample.txt
> +Conflict resolution is hard;
> +let's go shopping.
> +||||||| base:sample.txt
> +or cleanly resolved because both sides changed identically.
>  Conflict resolution is hard.
>  =======
>  Git makes conflict resolution easy.

OK, the text in the updated example clearly says what it is ;-) The base is not necessarily "unchanged from the common ancestor", but now includes "both sides changed the same way".

Nicely described.
Will queue.
Previous: Elijah Newren via GitGitGadgetNext: Jeff King
Message 8 of 39 in “RFC: implement new zdiff3 conflict style”
  1. 0/2 RFC: implement new zdiff3 conflict styleElijah Newren via GitGitGadget, Jun 15, 2021
  2. 1/2 xdiff: implement a zealous diff3, or "zdiff3"Elijah Newren via GitGitGadget, Jun 15, 2021
  3. Junio C HamanoJun 15, 2021
  4. Felipe ContrerasJun 15, 2021
  5. Elijah NewrenJun 15, 2021
  6. Sergey OrganovJun 15, 2021
  7. 2/2 update documentation for new zdiff3 conflictStyleElijah Newren via GitGitGadget, Jun 15, 2021
  8. Junio C HamanoJun 15, 2021
  9. Jeff KingJun 15, 2021
  10. Elijah NewrenJun 15, 2021
  11. Phillip WoodJun 16, 2021
  12. Jeff KingJun 16, 2021
  13. Phillip WoodJun 23, 2021
  14. Jeff KingJun 23, 2021
  15. Elijah NewrenJun 17, 2021
  16. Johannes SixtJun 15, 2021
  17. Elijah NewrenJun 15, 2021
  18. Johannes SixtJun 16, 2021
  19. Elijah NewrenJun 16, 2021
  20. 0/2 RFC: implement new zdiff3 conflict styleElijah Newren via GitGitGadget, Sep 11, 2021
  21. 1/2 xdiff: implement a zealous diff3, or "zdiff3"Elijah Newren via GitGitGadget, Sep 11, 2021
  22. Phillip WoodSep 15, 2021
  23. Phillip WoodSep 15, 2021
  24. Elijah NewrenSep 18, 2021
  25. Phillip WoodSep 24, 2021
  26. Elijah NewrenSep 18, 2021
  27. Phillip WoodSep 24, 2021
  28. 2/2 update documentation for new zdiff3 conflictStyleElijah Newren via GitGitGadget, Sep 11, 2021
  29. 0/2 RFC: implement new zdiff3 conflict styleElijah Newren via GitGitGadget, Sep 18, 2021
  30. 1/2 xdiff: implement a zealous diff3, or "zdiff3"Elijah Newren via GitGitGadget, Sep 18, 2021
  31. 2/2 update documentation for new zdiff3 conflictStyleElijah Newren via GitGitGadget, Sep 18, 2021
  32. 0/2 Implement new zdiff3 conflict styleElijah Newren via GitGitGadget, Nov 16, 2021
  33. 1/2 xdiff: implement a zealous diff3, or "zdiff3"Phillip Wood via GitGitGadget, Nov 16, 2021
  34. 2/2 update documentation for new zdiff3 conflictStyleElijah Newren via GitGitGadget, Nov 16, 2021
  35. 0/2 Implement new zdiff3 conflict styleElijah Newren via GitGitGadget, Dec 1, 2021
  36. 1/2 xdiff: implement a zealous diff3, or "zdiff3"Phillip Wood via GitGitGadget, Dec 1, 2021
  37. 2/2 update documentation for new zdiff3 conflictStyleElijah Newren via GitGitGadget, Dec 1, 2021
  38. Bagas SanjayaDec 2, 2021
  39. Eric SunshineDec 2, 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.