X-Loop: help-debbugs@HIDDEN
Subject: bug#29510: 3-way merge, diff3 lacking features
Resent-From: =?UTF-8?Q?Llu=C3=ADs?= Batlle i Rossell <viric@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-diffutils@HIDDEN
Resent-Date: Thu, 30 Nov 2017 13:55:02 +0000
Resent-Message-ID: <handler.29510.B.15120500992334 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 29510
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords:
To: 29510 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-diffutils@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.15120500992334
(code B ref -1); Thu, 30 Nov 2017 13:55:02 +0000
Received: (at submit) by debbugs.gnu.org; 30 Nov 2017 13:54:59 +0000
Received: from localhost ([127.0.0.1]:37658 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1eKPIk-0000bV-JD
for submit <at> debbugs.gnu.org; Thu, 30 Nov 2017 08:54:58 -0500
Received: from eggs.gnu.org ([208.118.235.92]:52914)
by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from
<4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN>)
id 1eKPIh-0000bI-8d
for submit <at> debbugs.gnu.org; Thu, 30 Nov 2017 08:54:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from
<4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN>)
id 1eKPIW-0006ZP-AB
for submit <at> debbugs.gnu.org; Thu, 30 Nov 2017 08:54:46 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level:
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,T_DKIM_INVALID
autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:37571)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71) (envelope-from
<4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN>)
id 1eKPIW-0006ZH-67
for submit <at> debbugs.gnu.org; Thu, 30 Nov 2017 08:54:40 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43880)
by lists.gnu.org with esmtp (Exim 4.71) (envelope-from
<4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN>)
id 1eKPIU-00055N-Km
for bug-diffutils@HIDDEN; Thu, 30 Nov 2017 08:54:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from
<4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN>)
id 1eKPIO-0006Vs-QD
for bug-diffutils@HIDDEN; Thu, 30 Nov 2017 08:54:38 -0500
Received: from o174.p8.mailjet.com ([87.253.233.174]:43971)
by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.71) (envelope-from
<4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN>)
id 1eKPIO-0006Uy-Ec
for bug-diffutils@HIDDEN; Thu, 30 Nov 2017 08:54:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; q=dns/txt;
d=viric.name; i=viric@HIDDEN; s=mailjet;
h=message-id:mime-version:from:to:subject:date:list-unsubscribe:x-accept-language:
x-csa-complaints:x-mj-mid:content-type:content-disposition:content-transfer-encoding;
bh=3tUhwmixU1g7WJXmhQnQVjBsmcN5IL8XsOgJNUK8om8=;
b=iZXm6KhTu8m8FZ9W4+LCz9Nh+a9vteY5Iam2MF/+RdG1QLqiAfloam6Z3
Emymua/LvGxv04dTUl4OrETP0S3BVG3TvZOPccbLsM/4dWhxOnCegXTt01a+
hiCt1lwmhvLoIGEIhU59iT+4ttrpHqy7JR8SmyVX2pQPU1Pb943vqk=
Message-Id: <4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN>
MIME-Version: 1.0
From: =?UTF-8?Q?Llu=C3=ADs?= Batlle i Rossell <viric@HIDDEN>
Date: Thu, 30 Nov 2017 14:54:21 +0100
X-Accept-Language: ca, es, eo, ru, en, jbo, tokipona
X-CSA-Complaints: whitelist-complaints@HIDDEN
X-MJ-Mid: AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2Opu1yhLSMRC60kfPLGkG6oAAHNTE
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
[fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)
Hello,
I've been using diff3 to do 3-way merges... and I failed to make it work
as I wanted, with properly bracketed conflicts. "git merge-file" works
much better. I wrote a summary where you can see how "git merge-file"
works better, only annotating the conflicting parts with full detail.
diff3 either brackets too much or it misses details.
Maybe I just fail to know how to operate diff3; please let me know.
Here goes the summary; "-----" lines means nonexistant. It is a screen ca=
pture
of vimdiff.
(web version: http://sprunge.us/hBjJ)
Source:
local.c base.c remote.c
#include <stdio.h> | #include <stdio.h> | #include <stdio.h=
>
------------------------| #include <stdlib.h> | -----------------=
-------
| |
int main() | int main() | int main()
{ | { | {
echo 2; | ------------------------| echo 1;
} | } | }
------------------------| ------------------------|
------------------------| ------------------------|
------------------------| ------------------------|
------------------------| ------------------------| #include <hola.h>
diff3 -m local.c base.c remote.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <stdio.h>
<<<<<<< base.c
#include <stdlib.h>
=3D=3D=3D=3D=3D=3D=3D
>>>>>>> remote.c
int main()
{
<<<<<<< local.c
echo 2;
||||||| base.c
=3D=3D=3D=3D=3D=3D=3D
echo 1;
>>>>>>> remote.c
}
#include <hola.h>
------------------------------------------------------------
diff3 -3 -m local.c base.c remote.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <stdio.h>
int main()
{
echo 2;
}
#include <hola.h>
------------------------------------------------------------
diff3 -x -m local.c base.c remote.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <stdio.h>
int main()
{
echo 1;
}
------------------------------------------------------------
diff3 -X -m local.c base.c remote.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <stdio.h>
int main()
{
<<<<<<< local.c
echo 2;
=3D=3D=3D=3D=3D=3D=3D
echo 1;
>>>>>>> remote.c
}
------------------------------------------------------------
git merge-file -p local.c base.c remote.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <stdio.h>
int main()
{
<<<<<<< local.c
echo 2;
||||||| base.c
=3D=3D=3D=3D=3D=3D=3D
echo 1;
>>>>>>> remote.c
}
------------------------------------------------------------
man diff3
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-e, --ed
output ed script incorporating changes from OLDFILE to YOU=
RFILE
into MYFILE
-E, --show-overlap
like -e, but bracket conflicts
-3, --easy-only
like -e, but incorporate only nonoverlapping changes
-x, --overlap-only
like -e, but incorporate only overlapping changes
-X like -x, but bracket conflicts
-i append `w' and `q' commands to ed scripts
-m, --merge
output actual merged file, according to -A if no other op=
tions
are given
------------------------------------------------------------
Regards,
Llu=EDs.
--=20
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key 7CBD1DA5 - https://emailselfdefense.fsf.org/
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: =?UTF-8?Q?Llu=C3=ADs?= Batlle i Rossell <viric@HIDDEN> Subject: bug#29510: Acknowledgement (3-way merge, diff3 lacking features) Message-ID: <handler.29510.B.15120500992334.ack <at> debbugs.gnu.org> References: <4e01d929.AEMASbSfssgAAAAAAAAAAGyqGxEAARpcY_sAAAAAAAeRJgBaIA2O@HIDDEN> X-Gnu-PR-Message: ack 29510 X-Gnu-PR-Package: diffutils Reply-To: 29510 <at> debbugs.gnu.org Date: Thu, 30 Nov 2017 13:55:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-diffutils@HIDDEN If you wish to submit further information on this problem, please send it to 29510 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 29510: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29510 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.