All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jeff King <peff@peff.net>, Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "Elijah Newren" <newren@gmail.com>,
	"Johannes Sixt" <j6t@kdbg.org>,
	"Sergey Organov" <sorganov@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH] xdiff: implement a zealous diff3
Date: Sun, 13 Jun 2021 13:00:33 -0500	[thread overview]
Message-ID: <60c647c1d9b5c_41f452089@natae.notmuch> (raw)
In-Reply-To: <YMYnVWSEgxvKRU9j@coredump.intra.peff.net>

Jeff King wrote:
> On Sun, Jun 13, 2021 at 09:31:55AM -0500, Felipe Contreras wrote:
> 
> > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > "zdiff3" is identical to ordinary diff3, only it allows more aggressive
> > compaction than diff3. This way the displayed base isn't necessary
> > technically correct, but still this mode might help resolving merge
> > conflicts between two near identical additions.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> > 
> > I'm re-sending this patch from 2013 because I do think it provides value
> > and we might want to make it the default.
> 
> I take it you didn't investigate the segfault I mentioned.

I don't know how I was supposed to investigate the few segfaults you
mentioned. All you said is that you never tracked the bug.

> Try this:
> 
>    commit=a5170794372cf1325710a3419473c91ec4af53bf
>    for style in merge diff3 zdiff3; do
>      git reset --hard
>      git checkout $commit^1
>      git -c merge.conflictstyle=$style merge $commit^2
>    done
> 
> The first two are fine; the zdiff3 one segfaults within the xmerge.c
> code.

I can reproduct the segfault, and here is a simpler way to reproduce it:

(I have a hacked version of diff3 until merge-file learns how to use
merge.conflictstyle)

  cat >b <<EOF
  A
  EOF

  cat >l <<EOF
  A

  B
  C
  D
  E
  F
  GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
  H
  I
  EOF

  cat >r <<EOF
  A

  b
  C
  D
  E
  F
  GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
  H
  i
  EOF

  $git merge-file --diff3 -p l b r

-- 
Felipe Contreras

  reply	other threads:[~2021-06-13 18:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 14:31 [PATCH] xdiff: implement a zealous diff3 Felipe Contreras
2021-06-13 15:42 ` Jeff King
2021-06-13 18:00   ` Felipe Contreras [this message]
2021-06-13 21:24     ` Felipe Contreras
2021-06-15  2:07       ` Junio C Hamano
2021-06-15  3:43         ` Elijah Newren
2021-06-15  4:03           ` Junio C Hamano
2021-06-15  9:20             ` Felipe Contreras
2021-06-15  9:16           ` Felipe Contreras
2021-06-15 16:59             ` Elijah Newren
2021-06-14  4:44     ` Jeff King
2021-06-15  4:19       ` Felipe Contreras
2021-06-15  9:24         ` Jeff King
2021-06-15 10:24           ` Felipe Contreras
  -- strict thread matches above, loose matches on Subject: below --
2013-03-06 20:03 feature suggestion: optimize common parts for checkout --conflict=diff3 Jeff King
2013-03-06 20:36 ` [PATCH] xdiff: implement a zealous diff3 Uwe Kleine-König
2013-03-06 20:46   ` Jeff King

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=60c647c1d9b5c_41f452089@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=sorganov@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.