From nobody Fri Feb 13 17:36:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fCK9B06pLz6SCDh for ; Fri, 13 Feb 2026 17:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fCK996rS7z3tph for ; Fri, 13 Feb 2026 17:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771004205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Iqhy0jkkRX/QHhvZG/R+IeMjuWtVKjbsDLrfEG0vh4=; b=yPp5GNnSuvyBPFYsrJqgdbdxoBE93WhfgMUkqOcblrfUAF3ZWtSvfozmUHjcQ71Pd36sWU NclWBPbmSVKYKPtrq9odpZ3rSdn48Yq+X4jFg9jtOqZiPrmdJDRg0+zewomFxTdlcApqbY 0c2QBXIW6PtZ2QcDJNa3gMj4ZFh5b3c+9m0T6w4eMTvzYq2HgVGgQPIcsERbMs1sy1w/FM +ddPMJtg1y6sfq22j8fTSZ38kiSeCey9hkeaEU+fYmNXe1sUxANX/xOyIYLNM1W+o0twAV c11zEKHc5NRtj1UT2KCMFVCpOOquwaRLg9Zs9xtCmpGGHWUetjgIvdjZ/q722w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771004205; a=rsa-sha256; cv=none; b=HNGzZQBj50Ud8eTpaJ1CIktMSn5/JHbyGkHQ0R3xqz5Np3uqAw6nkR9dbVcnsh+MtxPrC0 JAzxzVsu42cBGLNkhji3kc5gVn2WltjFCsPOjOPYli8bkjKho7tXpGa3GR4H2rewaNnCAn rx3kWnBpC76dQ8Sk/HeU9Zf5KpLG1NEnlJOQgw5G33aooj+yJ07RjdC3N9VzTC24XMURIP 5Dv1euMiY8pCxh8b8bRiPibhdtqh9ymHXGNaE7eYTYF97O+3kfbbGcO6S4d6tGm5oY2Jyb sXY8HC/XCKHk5phXZBG8zqImtv8VCS61rlIWcedjNVUSrXsv1vttShEmlzdiaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771004205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Iqhy0jkkRX/QHhvZG/R+IeMjuWtVKjbsDLrfEG0vh4=; b=XNp5o/rqQ+2KbDWF4GdAFDb3h5NkKKaXZztBWrRBqUyRAoAFtOhxufWM0Ys1QKQFoaiiOF ORgAZ6MaGSybDOm9/drAHPwhnadWoOkVy4bPtX0Fg7xFWFeC2n4qYh38Dp9rWXxlIKUERr fsTHIqh0A7kHoY3bjfHKF2+a0tKCLkhVvJrT+zWddIncQ/6Xxj0Vpyis3TwVhg6bIP1QIQ 7/lZevv0FrtAAMkC3+e5iYWqNzEWpQ/dx0HB1860WV1U8jauy1aa/ZAP+w5bkyE0B/0fHc rANu2PPxAQBL7+OmM9YjjljopN5S5VTYqKjdaloP2UBTktTzd2V8enzN1SGQnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fCK9968s6zWp1 for ; Fri, 13 Feb 2026 17:36:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31770 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Feb 2026 17:36:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 2cfca8e710f2 - main - diff3: fix merge mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cfca8e710f260b8a1bb1ee5e1836a52e468ef4b Auto-Submitted: auto-generated Date: Fri, 13 Feb 2026 17:36:45 +0000 Message-Id: <698f612d.31770.2e22521f@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2cfca8e710f260b8a1bb1ee5e1836a52e468ef4b commit 2cfca8e710f260b8a1bb1ee5e1836a52e468ef4b Author: Baptiste Daroussin AuthorDate: 2026-02-13 16:10:44 +0000 Commit: Baptiste Daroussin CommitDate: 2026-02-13 17:36:42 +0000 diff3: fix merge mode Make the merge mode compatible with GNU diff3 Add tests for all the changes, those tests are extracted from the etcupdate testsuite. This version passes the etcupdate testsuite and the diffutils diff3 test suite. MFC After: 1 week --- usr.bin/diff3/diff3.c | 51 ++++++++++++++++++------------------ usr.bin/diff3/tests/Makefile | 16 ++++++++++- usr.bin/diff3/tests/conflict1.txt | 5 ++++ usr.bin/diff3/tests/conflict2.txt | 9 +++++++ usr.bin/diff3/tests/conflict3.txt | 5 ++++ usr.bin/diff3/tests/diff3_test.sh | 45 ++++++++++++++++++++++++++++--- usr.bin/diff3/tests/passwd-Em.out | 16 +++++++++++ usr.bin/diff3/tests/passwd-new.txt | 12 +++++++++ usr.bin/diff3/tests/passwd-old.txt | 11 ++++++++ usr.bin/diff3/tests/passwd-test.txt | 15 +++++++++++ usr.bin/diff3/tests/simple-Em.out | 3 +++ usr.bin/diff3/tests/simple-merge.out | 3 +++ usr.bin/diff3/tests/simple1.txt | 2 ++ usr.bin/diff3/tests/simple2.txt | 2 ++ usr.bin/diff3/tests/simple3.txt | 3 +++ 15 files changed, 168 insertions(+), 30 deletions(-) diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c index 4f3239b10625..9a01951e60ab 100644 --- a/usr.bin/diff3/diff3.c +++ b/usr.bin/diff3/diff3.c @@ -150,7 +150,7 @@ static void repos(int); static void separate(const char *); static void edscript(int) __dead2; static void Ascript(int) __dead2; -static void mergescript(int) __dead2; +static void mergescript(int, int) __dead2; static void increase(void); static void usage(void); static void printrange(FILE *, struct range *); @@ -361,12 +361,13 @@ merge(int m1, int m2) { struct diff *d1, *d2, *d3; int j, t1, t2; + int f1f3delta; bool dup = false; d1 = d13; d2 = d23; j = 0; - int f1f3delta = 0; + f1f3delta = 0; for (;;) { t1 = (d1 < d13 + m1); @@ -382,6 +383,12 @@ merge(int m1, int m2) change(1, &d1->old, false); keep(2, &d1->new); change(3, &d1->new, false); + } else if (mflag) { + j++; + de[j].type = DIFF_TYPE1; + de[j].old = d1->old; + de[j].new = d1->new; + overlap[j] = 0; } else if (eflag == EFLAG_OVERLAP) { j = edit(d2, dup, j, DIFF_TYPE1); } @@ -437,6 +444,14 @@ merge(int m1, int m2) change(2, &d2->old, false); d3 = d1->old.to > d1->old.from ? d1 : d2; change(3, &d3->new, false); + } else if (mflag) { + j++; + de[j].type = DIFF_TYPE3; + de[j].old = d1->old; + de[j].new = d1->new; + overlap[j] = !dup; + if (!dup) + overlapcnt++; } else { j = edit(d1, dup, j, DIFF_TYPE3); } @@ -468,7 +483,7 @@ merge(int m1, int m2) } if (mflag) - mergescript(j); + mergescript(j, f1f3delta); else if (Aflag) Ascript(j); else if (eflag) @@ -701,7 +716,7 @@ edscript(int n) if (iflag) printf("w\nq\n"); - exit(eflag == EFLAG_NONE ? overlapcnt : 0); + exit(oflag ? overlapcnt > 0 : 0); } /* @@ -795,11 +810,10 @@ Ascript(int n) * inbetween lines. */ static void -mergescript(int i) +mergescript(int i, int f1f3delta) { struct range r, *new, *old; int n; - bool delete = false; r.from = 1; r.to = 1; @@ -812,13 +826,9 @@ mergescript(int i) * Print any lines leading up to here. If we are merging don't * print deleted ranges. */ - delete = (new->from == new->to); - if (de[n].type == DIFF_TYPE1 && delete) - r.to = new->from - 1; - else if (de[n].type == DIFF_TYPE3 && (old->from == old->to)) { - r.from = old->from - 1; - r.to = new->from; - } else if (de[n].type == DIFF_TYPE2) + if (de[n].type == DIFF_TYPE1) + r.to = old->to; + else if (de[n].type == DIFF_TYPE2) r.to = new->from + de_delta[n]; else r.to = old->from; @@ -826,9 +836,7 @@ mergescript(int i) printrange(fp[0], &r); switch (de[n].type) { case DIFF_TYPE1: - /* If this isn't a delete print it */ - if (!delete) - printrange(fp[2], new); + /* Content included in "between" printing from fp[0] */ break; case DIFF_TYPE2: printf("%s %s\n", oldmark, f2mark); @@ -870,8 +878,6 @@ mergescript(int i) if (de[n].type == DIFF_TYPE2) r.from = new->to + de_delta[n]; - else if (old->from == old->to) - r.from = new->to; else r.from = old->to; } @@ -879,18 +885,11 @@ mergescript(int i) /* * Print from the final range to the end of 'myfile'. Any deletions or * additions to this file should have been handled by now. - * - * If the ranges are the same we need to rewind a line. - * If the new range is 0 length (from == to), we need to use the new - * range. */ new = &de[n-1].new; old = &de[n-1].old; - if (old->from == new->from && old->to == new->to) - r.from--; - else if (new->from == new->to) - r.from = new->from; + r.from -= f1f3delta; r.to = INT_MAX; printrange(fp[2], &r); diff --git a/usr.bin/diff3/tests/Makefile b/usr.bin/diff3/tests/Makefile index 864f27beede8..e35ab095f2f7 100644 --- a/usr.bin/diff3/tests/Makefile +++ b/usr.bin/diff3/tests/Makefile @@ -23,6 +23,20 @@ ${PACKAGE}FILES+= \ long-A.out \ long-merge.out \ fbsdid1.txt \ - fbsdid2.txt + fbsdid2.txt \ + conflict1.txt \ + conflict2.txt \ + conflict3.txt \ + conflict-merge.out \ + simple1.txt \ + simple2.txt \ + simple3.txt \ + simple-merge.out \ + simple-Em.out \ + conflict-Em.out \ + passwd-test.txt \ + passwd-old.txt \ + passwd-new.txt \ + passwd-Em.out .include diff --git a/usr.bin/diff3/tests/conflict1.txt b/usr.bin/diff3/tests/conflict1.txt new file mode 100644 index 000000000000..d5bde7598f68 --- /dev/null +++ b/usr.bin/diff3/tests/conflict1.txt @@ -0,0 +1,5 @@ +# root: me@my.domain + +# Basic system aliases -- these MUST be present +MAILER-DAEMON: postmaster +postmaster: root diff --git a/usr.bin/diff3/tests/conflict2.txt b/usr.bin/diff3/tests/conflict2.txt new file mode 100644 index 000000000000..9afb26959e35 --- /dev/null +++ b/usr.bin/diff3/tests/conflict2.txt @@ -0,0 +1,9 @@ +#root:me@my.domain + +#Basicsystemaliases--theseMUSTbepresent +MAILER-DAEMON:postmaster +postmaster:root + +#Generalredirectionsforpseudoaccounts +_dhcp:root +_pflogd:root diff --git a/usr.bin/diff3/tests/conflict3.txt b/usr.bin/diff3/tests/conflict3.txt new file mode 100644 index 000000000000..14ac33b41853 --- /dev/null +++ b/usr.bin/diff3/tests/conflict3.txt @@ -0,0 +1,5 @@ +root:someone@example.com + +#Basicsystemaliases--theseMUSTbepresent +MAILER-DAEMON:postmaster +postmaster:root diff --git a/usr.bin/diff3/tests/diff3_test.sh b/usr.bin/diff3/tests/diff3_test.sh index 3cbd7dac1ed9..4510653bcd47 100755 --- a/usr.bin/diff3/tests/diff3_test.sh +++ b/usr.bin/diff3/tests/diff3_test.sh @@ -5,6 +5,11 @@ atf_test_case diff3_ed atf_test_case diff3_A atf_test_case diff3_merge atf_test_case diff3_E_merge +atf_test_case diff3_merge_conflict +atf_test_case diff3_merge_simple +atf_test_case diff3_Em_simple +atf_test_case diff3_Em_conflict +atf_test_case diff3_Em_insert diff3_body() { @@ -20,10 +25,10 @@ diff3_body() atf_check -o file:$(atf_get_srcdir)/2.out \ diff3 -e $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt - atf_check -o file:$(atf_get_srcdir)/3.out \ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/3.out \ diff3 -E -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt - atf_check -o file:$(atf_get_srcdir)/4.out \ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/4.out \ diff3 -X -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt atf_check -o file:$(atf_get_srcdir)/5.out \ @@ -75,7 +80,6 @@ expected="<<<<<<< 2 ======= # \$FreeBSD: head/local 12345 jhb \$ >>>>>>> 3 -# \$FreeBSD: head/local 12345 jhb \$ this is a file @@ -97,6 +101,36 @@ these are some local mods to the file } +diff3_merge_conflict_body() +{ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/conflict-merge.out \ + diff3 -m -L conflict3.txt -L conflict1.txt -L conflict2.txt $(atf_get_srcdir)/conflict3.txt $(atf_get_srcdir)/conflict1.txt $(atf_get_srcdir)/conflict2.txt +} + +diff3_merge_simple_body() +{ + atf_check -s exit:0 -o file:$(atf_get_srcdir)/simple-merge.out \ + diff3 -m $(atf_get_srcdir)/simple3.txt $(atf_get_srcdir)/simple1.txt $(atf_get_srcdir)/simple2.txt +} + +diff3_Em_simple_body() +{ + atf_check -s exit:0 -o file:$(atf_get_srcdir)/simple-Em.out \ + diff3 -E -m $(atf_get_srcdir)/simple3.txt $(atf_get_srcdir)/simple1.txt $(atf_get_srcdir)/simple2.txt +} + +diff3_Em_conflict_body() +{ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/conflict-Em.out \ + diff3 -E -m -L conflict3.txt -L conflict1.txt -L conflict2.txt $(atf_get_srcdir)/conflict3.txt $(atf_get_srcdir)/conflict1.txt $(atf_get_srcdir)/conflict2.txt +} + +diff3_Em_insert_body() +{ + atf_check -s exit:0 -o file:$(atf_get_srcdir)/passwd-Em.out \ + diff3 -E -m $(atf_get_srcdir)/passwd-test.txt $(atf_get_srcdir)/passwd-old.txt $(atf_get_srcdir)/passwd-new.txt +} + atf_init_test_cases() { atf_add_test_case diff3 @@ -105,4 +139,9 @@ atf_init_test_cases() atf_add_test_case diff3_A atf_add_test_case diff3_merge atf_add_test_case diff3_E_merge + atf_add_test_case diff3_merge_conflict + atf_add_test_case diff3_merge_simple + atf_add_test_case diff3_Em_simple + atf_add_test_case diff3_Em_conflict + atf_add_test_case diff3_Em_insert } diff --git a/usr.bin/diff3/tests/passwd-Em.out b/usr.bin/diff3/tests/passwd-Em.out new file mode 100644 index 000000000000..2b52a6440f6b --- /dev/null +++ b/usr.bin/diff3/tests/passwd-Em.out @@ -0,0 +1,16 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin +john::1001:1001::0:0:John Baldwin:/home/john:/bin/tcsh +messagebus:*:556:556::0:0:D-BUS Daemon User:/nonexistent:/usr/sbin/nologin +polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin +haldaemon:*:560:560::0:0:HAL Daemon User:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/passwd-new.txt b/usr.bin/diff3/tests/passwd-new.txt new file mode 100644 index 000000000000..8bec617219a3 --- /dev/null +++ b/usr.bin/diff3/tests/passwd-new.txt @@ -0,0 +1,12 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/passwd-old.txt b/usr.bin/diff3/tests/passwd-old.txt new file mode 100644 index 000000000000..7a6f936e90c9 --- /dev/null +++ b/usr.bin/diff3/tests/passwd-old.txt @@ -0,0 +1,11 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/passwd-test.txt b/usr.bin/diff3/tests/passwd-test.txt new file mode 100644 index 000000000000..f2b277fb3b4c --- /dev/null +++ b/usr.bin/diff3/tests/passwd-test.txt @@ -0,0 +1,15 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin +john::1001:1001::0:0:John Baldwin:/home/john:/bin/tcsh +messagebus:*:556:556::0:0:D-BUS Daemon User:/nonexistent:/usr/sbin/nologin +polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin +haldaemon:*:560:560::0:0:HAL Daemon User:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/simple-Em.out b/usr.bin/diff3/tests/simple-Em.out new file mode 100644 index 000000000000..c9ad1c1bed8f --- /dev/null +++ b/usr.bin/diff3/tests/simple-Em.out @@ -0,0 +1,3 @@ +this is an new line + +this is a local line diff --git a/usr.bin/diff3/tests/simple-merge.out b/usr.bin/diff3/tests/simple-merge.out new file mode 100644 index 000000000000..c9ad1c1bed8f --- /dev/null +++ b/usr.bin/diff3/tests/simple-merge.out @@ -0,0 +1,3 @@ +this is an new line + +this is a local line diff --git a/usr.bin/diff3/tests/simple1.txt b/usr.bin/diff3/tests/simple1.txt new file mode 100644 index 000000000000..4c4c2cd1a4e7 --- /dev/null +++ b/usr.bin/diff3/tests/simple1.txt @@ -0,0 +1,2 @@ +this is an old line + diff --git a/usr.bin/diff3/tests/simple2.txt b/usr.bin/diff3/tests/simple2.txt new file mode 100644 index 000000000000..e880a8af5c39 --- /dev/null +++ b/usr.bin/diff3/tests/simple2.txt @@ -0,0 +1,2 @@ +this is an new line + diff --git a/usr.bin/diff3/tests/simple3.txt b/usr.bin/diff3/tests/simple3.txt new file mode 100644 index 000000000000..4ab38534cba1 --- /dev/null +++ b/usr.bin/diff3/tests/simple3.txt @@ -0,0 +1,3 @@ +this is an old line + +this is a local line