summaryrefslogtreecommitdiff
path: root/usr.bin/diff/diffreg_new.c
AgeCommit message (Collapse)Author
2024-12-23diff: Fix device case.Dag-Erling Smørgrav
We already fell back to Stone for FIFOs, but we actually need to fall back to Stone for everything except regular files, because libdiff's atomizer needs to know the size of its input in advance, and neither FIFOs nor devices can be trusted to report their size. MFC after: 1 week Reported by: mav Reviewed by: mav, allanjude Differential Revision: https://reviews.freebsd.org/D48181
2024-10-02libdiff: Implement diff coloring.Dag-Erling Smørgrav
This patch got accidentally left out when libdiff was imported. The rest of the code (command-line option etc.) was present, just not the part that actually prints ANSI color codes. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46873
2024-05-20diff: Warn if the atomizer detected truncation.Dag-Erling Smørgrav
Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D45219
2024-05-03diff: Sort headers.Dag-Erling Smørgrav
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45078
2024-03-27diff: Integrate libdiff from OpenBSD GoT.Dag-Erling Smørgrav
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. Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D44302