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.