History log of /freebsd-current/usr.bin/diff3/tests/Makefile
Revision Date Author Comments
# b37a6938 05-Sep-2023 Baptiste Daroussin <bapt@FreeBSD.org>

diff3: make the diff3 -E -m and diff3 -m behaviour match gnu diff3

In gnu diff3 3 way merging files where the new file and the target are
already the same will die and show what has failed to be merged except
if -E is passed in argument, in this case it will finish the merge.

This difference in behaviour was breaking one of the etcupdate testcase
with bsd diff3

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D41730


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 034dd2d5 19-Apr-2022 Tom Jones <thj@FreeBSD.org>

diff3: Add support for -m

diff3 in -m mode generates a complete file with changes bracketed with
conflict markers. This adds support for diff3 to generate version
control style three way merge output.

The output format was inferred from looking at the gnu diff3 output on a
selection of test files as a specification of what diff3 -m should
output is not available. It is likely there are cases where the -m
output differs from other tools and I am happy to update diff3 to
address these.

Discussed with: pstef, kevans
Sponsored by: Klara, Inc.


# 9ab079c5 19-Apr-2022 Tom Jones <thj@FreeBSD.org>

diff3: Add support for -A

Diff3 in -A mode generates an ed script to show how the 3 files and
brackets changes that conflict. The ed script generated should when
applied leave familiar merge conflict markers in a patched file.

Diff3 output is not documented, this feature has been arrived at by
comparing bsd diff3 output to gnu diff3 output until they were made to
agree. There are likely to still be differences between these formats.

The gnu diff3 guide is actually quite good at explaining how diff3
output should appear, but it doesn't cover every form of output from
diff3.

https://www.gnu.org/software/diffutils/manual/diffutils.html#Comparing-Three-Files

Discussed with: pstef, kevans
Sponsored by: Klara, Inc.


# 7c03df68 15-Apr-2022 Tom Jones <thj@FreeBSD.org>

diff3: allow diff3 ed scripts to generate deletions

diff3 with the -e (ed script flag) can generate line deletions, add
support for deletions and add a test case to exercise this behaviour.
This functionality was unearthed through comparison of bsd diff3 and gnu
diff3 output.

Reviewed by: pstef
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D34912


# 9f7a81b1 23-Aug-2021 Piotr Pawel Stefaniak <pstef@FreeBSD.org>

diff3: document and test -T

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D31650


# 54a3415c 20-Aug-2021 Piotr Pawel Stefaniak <pstef@FreeBSD.org>

diff3: implement --strip-trailing-cr

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D31626


# e1910ebd 25-May-2017 Baptiste Daroussin <bapt@FreeBSD.org>

Import working progress BSD diff3

import bsd diff3 from OpenBSD.
Differences with OpenBSD:
- lots of warning fixed
- no shell wrapper with diff3 actually living in libexec
- capsicumized

Keep it disconnected as it is not yet good enough to replace GNU diff

The motivation to import it now it to allow other people to jump in and also to
have an open development on it

Obtained from: OpenBSD