All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
	Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] xdiff: implement a zealous diff3, or "zdiff3"
Date: Tue, 15 Jun 2021 21:50:12 +0300	[thread overview]
Message-ID: <8735tj2c9n.fsf@osv.gnss.ru> (raw)
In-Reply-To: <CABPp-BHjXf88MQYX8Fd3WGw2WfbMKAdAD-MEViiB7oTtQbfTyw@mail.gmail.com> (Elijah Newren's message of "Tue, 15 Jun 2021 11:12:35 -0700")

Elijah Newren <newren@gmail.com> writes:

> On Tue, Jun 15, 2021 at 2:40 AM Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>>
>> Elijah Newren via GitGitGadget wrote:
>> > From: Elijah Newren <newren@gmail.com>
>> >
>> > "zdiff3" is identical to ordinary diff3 except that it allows compaction
>> > of common lines on the two sides of history at the beginning or end of
>> > the conflict hunk.
>>
>> That was not the main reason behind zdiff3.
>>
>> The whole point of zdiff3 was to have something closer to the "merge"
>> style, even if not technically correct.
>>
>> Your proposal is better than diff3 in that respect, but worse than Uwe's
>> zdiff3.
>>
>> If you have this:
>>
>>   l  b  r
>>   =  =  =
>>   A  A  A
>>
>>   B     b
>>   C     C
>>   D     D
>>   E     E
>>   F     F
>>   I     i
>>
>> merge will output this:
>>
>>   A
>>
>>   <<<<<<< l
>>   B
>>   =======
>>   b
>>   >>>>>>> r
>>   C
>>   D
>>   E
>>   F
>>   <<<<<<< l
>>   I
>>   =======
>>   i
>>   >>>>>>> r
>>
>> This is simple, and useful.
>>
>> diff3 will output this:
>>
>>   A
>>   <<<<<<< l
>>
>>   B
>>   C
>>   D
>>   E
>>   F
>>   I
>>   ||||||| b
>>   =======
>>
>>   b
>>   C
>>   D
>>   E
>>   F
>>   i
>>   >>>>>>> r
>>
>> Not very friendly.

For me it's friendly enough. One key-press in Emacs and I get:

--- upper/xx.txt
+++ lower/xx.txt
@@ -1,7 +1,7 @@
 
-B
+b
 C
 D
 E
 F
-I
+i

In a separate window, that is roughly what you've get in the "merge"
output in the first place, but even more compact.

My point is that once Git provides enough context, a good interactive
tool will do the rest just fine, beneficial to the end-user.

-- Sergey Organov

  reply	other threads:[~2021-06-15 18:50 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
2021-06-15  9:40   ` Felipe Contreras
2021-06-15 18:12     ` Elijah Newren
2021-06-15 18:50       ` Sergey Organov [this message]
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=8735tj2c9n.fsf@osv.gnss.ru \
    --to=sorganov@gmail.com \
    --cc=felipe.contreras@gmail.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.