<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/diff/tests/Makefile, branch releng/14.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-08-16T17:55:03Z</updated>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>urn:sha1:d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
</entry>
<entry>
<title>diff: fix side-by-side output with tabbed input</title>
<updated>2022-12-14T01:31:21Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2022-12-14T01:31:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8bf187f35b6298b7848c5ecf45b0b714327090d9'/>
<id>urn:sha1:8bf187f35b6298b7848c5ecf45b0b714327090d9</id>
<content type='text'>
The previous logic conflated some things... in this block:
- j: input characters rendered so far
- nc: number of characters in the line
- col: columns rendered so far
- hw: column width ((h)ard (w)idth?)

Comparing j to hw or col to nc are naturally wrong, as col and hw are
limits on their respective counters and nc is already brought down to hw
if the input line should be truncated to start with.

Right now, we end up easily truncating lines with tabs in them as we
count each tab for $tabwidth lines in the input line, but we really
should only be accounting for them in the column count.  The problem is
most easily demonstrated by the two input files added for the tests,
the two tabbed lines lose at least a word or two even though there's
plenty of space left in the row for each side.

Reviewed by:	bapt, pstef
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37676
</content>
</entry>
<entry>
<title>diff: Detect Objective-C methods</title>
<updated>2022-02-18T15:09:57Z</updated>
<author>
<name>Tom Jones</name>
<email>thj@FreeBSD.org</email>
</author>
<published>2022-02-18T15:07:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8f79bd9b85716c495c2741ac25db37e8d71f22f7'/>
<id>urn:sha1:8f79bd9b85716c495c2741ac25db37e8d71f22f7</id>
<content type='text'>
When searching back for function definitions, consider lines starting
with '+' and '-', this allows us to pick up Objective-C methods as well
as C style function definitions.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34202
</content>
</entry>
<entry>
<title>diff: don't output carriage returns that were stripped on input</title>
<updated>2021-08-23T05:04:28Z</updated>
<author>
<name>Piotr Pawel Stefaniak</name>
<email>pstef@FreeBSD.org</email>
</author>
<published>2021-08-22T16:05:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=af2f0164318455433db95adce07af829285b78ad'/>
<id>urn:sha1:af2f0164318455433db95adce07af829285b78ad</id>
<content type='text'>
--strip-trailing-cr worked as intended for comparison between files,
but the characters were still present in final output.
</content>
</entry>
<entry>
<title>diff(1): Implement -B/--ignore-blank-lines</title>
<updated>2018-08-19T03:57:20Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-08-19T03:57:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e68edb8cf06a796453378b98d963692c838c400f'/>
<id>urn:sha1:e68edb8cf06a796453378b98d963692c838c400f</id>
<content type='text'>
As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag.
This was not previously implemented here, so one was forced to create a link
for GNU diff to /usr/local/bin/diff

Implement the -B flag and add some primitive tests for it. It is implemented
in the same fashion that -I is implemented; each chunk's lines are scanned,
and if a non-blank line is encountered then the chunk will be output.
Otherwise, it's skipped.

MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Use more flexible expression for replacing t_diff in</title>
<updated>2017-07-19T18:30:16Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-07-19T18:30:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=274b460b606f7a16841eba3b7dfbfc4992ee6eb0'/>
<id>urn:sha1:274b460b606f7a16841eba3b7dfbfc4992ee6eb0</id>
<content type='text'>
contrib/netbsd-tests/usr.bin/diff/t_diff.sh with the name of the script via
`basename $0`.

This was a change I forgot to port over from
^/head/gnu/usr.bin/diff/tests/Makefile@r272787.
</content>
</entry>
<entry>
<title>Implement a basic --changed-group-format</title>
<updated>2017-04-20T14:22:33Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2017-04-20T14:22:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fddcb7b82ff45dc9e08bab26bbfe7a2d2e8ca20f'/>
<id>urn:sha1:fddcb7b82ff45dc9e08bab26bbfe7a2d2e8ca20f</id>
<content type='text'>
etcupdate(8) requires that option, while GNU diff supports many more variation
of that options, their behaviour beside the simple verion implemented here are
quite inconsistent as such I do not plan to implement those.

The only special keyword supported by this implementation are: %&lt; and %&gt;
%= is not implemented as the documentation of GNU diff says: common lines, but
it actually when tested print the changes from the first file
</content>
</entry>
<entry>
<title>Add a regression test for diff -D</title>
<updated>2017-04-20T11:32:18Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2017-04-20T11:32:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=05d06ecac32d892eafc5e8e13652324d8f5ac46a'/>
<id>urn:sha1:05d06ecac32d892eafc5e8e13652324d8f5ac46a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>diff: Show nanoseconds in -u/-c header line.</title>
<updated>2017-03-26T19:47:43Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2017-03-26T19:47:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=385a67dc6aec2ac34b65099bddd157c88fdf4fda'/>
<id>urn:sha1:385a67dc6aec2ac34b65099bddd157c88fdf4fda</id>
<content type='text'>
Show nanoseconds in the -u/-c header line.

The present portability conditionals cannot handle the POSIX standard
st_mtim, so remove them and unconditionally use st_mtim.

PR:		218018
Reported by:	jbeich
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D10145
</content>
</entry>
<entry>
<title>diff: Fix mtime of file1 in -u/-c header line.</title>
<updated>2017-03-26T14:09:25Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2017-03-26T14:09:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=58cf4d864f54b697ce69078c90d338ed3580821d'/>
<id>urn:sha1:58cf4d864f54b697ce69078c90d338ed3580821d</id>
<content type='text'>
PR:		218018
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D10140
</content>
</entry>
</feed>
