All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH 1/2] xdiff: implement a zealous diff3, or "zdiff3"
Date: Tue, 15 Jun 2021 15:13:46 +0900	[thread overview]
Message-ID: <xmqqv96fven9.fsf@gitster.g> (raw)
In-Reply-To: <b7561a67c192d4bdede47fee5b7b1cb30c44b785.1623734171.git.gitgitgadget@gmail.com> (Elijah Newren via GitGitGadget's message of "Tue, 15 Jun 2021 05:16:09 +0000")

"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:

[An example to reduce
    1234<ABCDE|56=AXCYE>789
to
    1234A<BCD|56=XCY>E789
elided]

> Note that the common lines, 'A', and 'E' were moved outside the
> conflict.  Unlike with the two-way conflicts from the 'merge'
> conflictStyle, the zdiff3 conflict is NOT split into multiple conflict
> regions to allow the common 'C' lines to be shown outside a conflict,
> because zdiff3 shows the base version too and the base version cannot be
> reasonably split.

Another thing that was brought up during the original discussion is
that zdiff3 uses different meaning of "base version" from diff3.  In
diff3 output, if you remove everything enclosed in <<< and |||, and
everything enclosed in === and >>>, i.e. 123456789 in the original
example above, you will get "the common ancestor" version, which is
what is shown as the "base".  After zdiff3 munges the lines, that is
not the case, 1234A56E789 never appeared in anybody's version.  It
is a "starting from the common ancestor version, both sides agreed
to make the same uncontroversial changes, which is already included
in this base version" and zdiff3 inserts the conflict markers and
material unique to each side into it.  Being able to recover the
common ancestor version is not always necessary and that is what
makes zdiff3 a plausible solution, but to some workflows and tools
it may matter, so it would be helpful to mention it in the
documentation.

Thanks.

  reply	other threads:[~2021-06-15  6:13 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  5:16 [PATCH 0/2] RFC: implement new zdiff3 conflict style Elijah Newren via GitGitGadget
2021-06-15  5:16 ` [PATCH 1/2] xdiff: implement a zealous diff3, or "zdiff3" Elijah Newren via GitGitGadget
2021-06-15  6:13   ` Junio C Hamano [this message]
2021-06-15  9:40   ` Felipe Contreras
2021-06-15 18:12     ` Elijah Newren
2021-06-15 18:50       ` Sergey Organov
2021-06-15  5:16 ` [PATCH 2/2] update documentation for new zdiff3 conflictStyle Elijah Newren via GitGitGadget
2021-06-15  6:21   ` Junio C Hamano
2021-06-15  9:43 ` [PATCH 0/2] RFC: implement new zdiff3 conflict style Jeff King
2021-06-15 19:35   ` Elijah Newren
2021-06-16  8:57     ` Phillip Wood
2021-06-16 10:31       ` Jeff King
2021-06-23  9:53         ` Phillip Wood
2021-06-23 22:28           ` Jeff King
2021-06-17  5:03       ` Elijah Newren
2021-06-15 21:36 ` Johannes Sixt
2021-06-15 21:45   ` Elijah Newren
2021-06-16  6:16     ` Johannes Sixt
2021-06-16  8:14       ` Elijah Newren
2021-09-11 17:03 ` [PATCH v2 " Elijah Newren via GitGitGadget
2021-09-11 17:03   ` [PATCH v2 1/2] xdiff: implement a zealous diff3, or "zdiff3" Elijah Newren via GitGitGadget
2021-09-15 10:25     ` Phillip Wood
2021-09-15 11:21       ` Phillip Wood
2021-09-18 22:06         ` Elijah Newren
2021-09-24 10:09           ` Phillip Wood
2021-09-18 22:04       ` Elijah Newren
2021-09-24 10:16         ` Phillip Wood
2021-09-11 17:03   ` [PATCH v2 2/2] update documentation for new zdiff3 conflictStyle Elijah Newren via GitGitGadget
2021-09-18 23:02   ` [PATCH v3 0/2] RFC: implement new zdiff3 conflict style Elijah Newren via GitGitGadget
2021-09-18 23:02     ` [PATCH v3 1/2] xdiff: implement a zealous diff3, or "zdiff3" Elijah Newren via GitGitGadget
2021-09-18 23:02     ` [PATCH v3 2/2] update documentation for new zdiff3 conflictStyle Elijah Newren via GitGitGadget
2021-11-16  2:13     ` [PATCH v4 0/2] Implement new zdiff3 conflict style Elijah Newren via GitGitGadget
2021-11-16  2:13       ` [PATCH v4 1/2] xdiff: implement a zealous diff3, or "zdiff3" Phillip Wood via GitGitGadget
2021-11-16  2:13       ` [PATCH v4 2/2] update documentation for new zdiff3 conflictStyle Elijah Newren via GitGitGadget
2021-12-01  0:05       ` [PATCH v5 0/2] Implement new zdiff3 conflict style Elijah Newren via GitGitGadget
2021-12-01  0:05         ` [PATCH v5 1/2] xdiff: implement a zealous diff3, or "zdiff3" Phillip Wood via GitGitGadget
2021-12-01  0:05         ` [PATCH v5 2/2] update documentation for new zdiff3 conflictStyle Elijah Newren via GitGitGadget
2021-12-02  8:42           ` Bagas Sanjaya
2021-12-02 13:28             ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqv96fven9.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.