Page MenuHomeFreeBSD

diff: Integrate libdiff from OpenBSD GoT.
ClosedPublic

Authored by des on Mar 11 2024, 1:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 9, 11:31 AM
Unknown Object (File)
Tue, May 7, 3:57 AM
Unknown Object (File)
Fri, May 3, 8:54 PM
Unknown Object (File)
Fri, May 3, 4:49 PM
Unknown Object (File)
Fri, May 3, 4:48 PM
Unknown Object (File)
Sun, Apr 21, 2:37 AM
Unknown Object (File)
Sat, Apr 20, 4:40 PM
Unknown Object (File)
Sat, Apr 20, 2:37 PM

Details

Summary

This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic Stone algorithm and support escapes when worst case scenarios
are encountered.

Add the -A flag to allow selection of the algorithm, but default to
using the new Myers diff implementation.

The libdiff implementation currently only supports a subset of input and
output options supported by diff. When these options are used, but the
algorithm is not selected, automatically fallback to the classic Stone
algorithm until support for these modes can be added.

Based on work originally done by thj@ with contributions from kevans@.

Sponsored by: Klara, Inc.

Diff Detail

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

Event Timeline

remove spurious verbiage from man page

usr.bin/diff/diff.1
360
usr.bin/diff/diff.1
360

I'm not entirely sure what the comment is trying to say, perhaps @thj can weigh in?

Please fix the man page typo, but otherwise looks good to me

usr.bin/diff/diff.1
360

Myers will try to avoid excessive computation in certain cases and rather than giving the minimal diff it will give a valid, but not completely optimised diff. Other than the typo fix from Ed I'm not really sure how to clarify this more.

This revision is now accepted and ready to land.Mar 27 2024, 9:40 AM
This revision was automatically updated to reflect the committed changes.