Page MenuHomeFreeBSD

diff3: preliminary cleanup
ClosedPublic

Authored by pstef on Aug 20 2021, 11:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 7, 7:22 PM
Unknown Object (File)
Wed, Oct 2, 10:15 AM
Unknown Object (File)
Tue, Sep 24, 12:57 AM
Unknown Object (File)
Sat, Sep 21, 6:38 AM
Unknown Object (File)
Thu, Sep 19, 11:52 PM
Unknown Object (File)
Thu, Sep 19, 10:27 PM
Unknown Object (File)
Thu, Sep 19, 9:16 PM
Unknown Object (File)
Thu, Sep 12, 2:00 AM
Subscribers
None

Details

Summary

This is actually 5 commits:

commit 1fac95c8b38751bc4e64b64179be4b36f8a45ce3 (HEAD -> private)
Author: Piotr Pawel Stefaniak <pstef@FreeBSD.org>
Date: Sun Aug 22 12:08:39 2021 +0200

Register /usr/tests/usr.bin/diff3

I wasn't able to make check to run diff3 tests, but kevans figured out
that I was missing diff3 in mtree.

commit 1da4e59b6bf2cbfa03eb02042bb55c5df2ee88a8
Author: Piotr Pawel Stefaniak <pstef@FreeBSD.org>
Date: Sat Aug 21 02:28:58 2021 +0200

diff3: implement --strip-trailing-cr

commit e24570f461d3ac4d9a0c6e906b7b2bfd0454aa9f
Author: Piotr Pawel Stefaniak <pstef@FreeBSD.org>
Date: Sat Aug 21 00:50:05 2021 +0200

diff3.1: update manual page to match code

commit a82db9fd9b80c79d57800bc86fb9998398271496
Author: Piotr Pawel Stefaniak <pstef@FreeBSD.org>
Date: Fri Aug 20 23:50:20 2021 +0200

diff3: improve style

commit 7548a41c40d5aca3e09245bece4d252ea3caec2c
Author: Piotr Pawel Stefaniak <pstef@FreeBSD.org>
Date: Fri Aug 20 23:35:24 2021 +0200

diff3: sync with upstream

 * replace realloc calls with reallocarray calls
 * fix merging of files that lack newlines

Obtained from:  OpenBSD

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pstef created this revision.

Include a commit that I omitted by mistake.

pstef edited the summary of this revision. (Show Details)

Add --strip-trailing-cr

This revision is now accepted and ready to land.Aug 21 2021, 4:38 AM

I think it would be a good idea to add a regression test for strip-trailing-cr having plenty of tests helps comparing with gnu diff3

pstef edited the summary of this revision. (Show Details)

Improve --strip-trailing-cr implementation
add a test case
register diff3 tests with mtree

This revision now requires review to proceed.Aug 22 2021, 1:35 PM
This revision is now accepted and ready to land.Aug 22 2021, 7:39 PM
This revision was automatically updated to reflect the committed changes.