<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/diff, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-06-03T20:50:38Z</updated>
<entry>
<title>diff: Correct fd 0 case on pipe</title>
<updated>2026-06-03T20:50:38Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2026-06-03T20:42:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8bf4902569869133affd91bdcb71b74656cfc36e'/>
<id>urn:sha1:8bf4902569869133affd91bdcb71b74656cfc36e</id>
<content type='text'>
After git commit c8d40bf8ecc60cc15e3904410db62065ea681fdc, if fd 0 was
not open, it is left with CLOEXEC set and therefore fails. This is an
unlikely situation, but fixing it reduces the size of the code (by using
posix_spawn_file_actions_adddup2's special case if the two file
descriptor numbers are the same).

At the same time, check the error code from
posix_spawn_file_actions_adddup2.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D56910
</content>
</entry>
<entry>
<title>diff: use O_CLOEXEC on pipes</title>
<updated>2026-03-28T08:55:24Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2026-03-28T08:55:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c8d40bf8ecc60cc15e3904410db62065ea681fdc'/>
<id>urn:sha1:c8d40bf8ecc60cc15e3904410db62065ea681fdc</id>
<content type='text'>
This only simplifies the code, no functional changes expected

MFC After:	1 week
</content>
</entry>
<entry>
<title>diff: handle read(2) failures</title>
<updated>2026-03-26T09:25:50Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2026-03-26T09:25:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9b98c4b053917cad42e26596b37df72efab6dc39'/>
<id>urn:sha1:9b98c4b053917cad42e26596b37df72efab6dc39</id>
<content type='text'>
MFC After:	1 week
</content>
</entry>
<entry>
<title>diff: prefer posix_spawn over pdfork/execl</title>
<updated>2026-03-26T07:36:55Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2026-03-25T10:22:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6d8b2ac449f34423be9d56492022421db61d920e'/>
<id>urn:sha1:6d8b2ac449f34423be9d56492022421db61d920e</id>
<content type='text'>
MFC After:		1 week
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D56076
</content>
</entry>
<entry>
<title>diff: Add SPDX-License-Identifier tag</title>
<updated>2026-02-19T13:25:40Z</updated>
<author>
<name>Tuukka Pasanen</name>
<email>tuukka.pasanen@ilmi.fi</email>
</author>
<published>2026-02-09T08:26:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=878cee8d9b9b4c7c5530b0960306c04b1b691325'/>
<id>urn:sha1:878cee8d9b9b4c7c5530b0960306c04b1b691325</id>
<content type='text'>
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
</content>
</entry>
<entry>
<title>diff: Drop unnecessary casts, fix none algo</title>
<updated>2026-02-18T18:28:29Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-18T18:28:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d5404462f691230423dc8cc543c6fdc44f34ec31'/>
<id>urn:sha1:d5404462f691230423dc8cc543c6fdc44f34ec31</id>
<content type='text'>
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55349
</content>
</entry>
<entry>
<title>diff: Tweak recursion tests</title>
<updated>2026-02-13T20:19:16Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-13T20:18:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b2532432971fbd9339a9a49eca1b532978bb6d48'/>
<id>urn:sha1:b2532432971fbd9339a9a49eca1b532978bb6d48</id>
<content type='text'>
The -r flag is not required to compare two directories; it is only
required to compare them recursively, i.e. descend into their common
subdirectories.  Adjust tests that use -r needlessly, and adjust the
dirloop test to verify that these two cases remain distinct.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55262
</content>
</entry>
<entry>
<title>diff: Tweak range of -C and -U arguments</title>
<updated>2026-02-13T20:19:16Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-13T20:18:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=790f1d1cc5fa892ba59fd7f239b22064c8ab14c7'/>
<id>urn:sha1:790f1d1cc5fa892ba59fd7f239b22064c8ab14c7</id>
<content type='text'>
POSIX uses the terms “positive decimal integer” for -C and “non-negative
decimal integer” for -U, which translates into lower bounds of 1 for -C
and 0 for -U.

POSIX does not specify a minimum upper bound for either mode, but as of
5fc739eb5949 both our backends support context sizes up to and including
INT_MAX, so use that.

Having had the opportunity to consult the Unix System Test Suite, the
diff test cases found therein happen to precisely match these bounds.

While here, switch to using strtonum() to parse numerical arguments, and
try to be more consistent in how we report usage errors.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55261
</content>
</entry>
<entry>
<title>diff: Improve directory loop detection</title>
<updated>2026-02-11T16:24:54Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-11T16:24:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=71569594d860a59d8362770a56d806e1d31fb946'/>
<id>urn:sha1:71569594d860a59d8362770a56d806e1d31fb946</id>
<content type='text'>
When we're done processing a directory, remove its entry from the tree
of visited inodes, ensuring that we only report a loop when we encounter
a descendant-to-ancestor link, not when we encounter a cousin-to-cousin
or sibling-to-sibling link.

MFC after:	1 week
Reported by:	Bakul Shah &lt;bakul@iitbombay.org&gt;
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55248
</content>
</entry>
<entry>
<title>diff: Bump version number</title>
<updated>2026-02-06T00:14:05Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-06T00:13:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=40134060f6583486ad8ab303140fa73960d3de3d'/>
<id>urn:sha1:40134060f6583486ad8ab303140fa73960d3de3d</id>
<content type='text'>
MFC after:	1 week
Sponsored by:	Klara, Inc.
</content>
</entry>
</feed>
