<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/patch, branch upstream/11.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2018-03-29T02:50:57Z</updated>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
</content>
</entry>
<entry>
<title>MFC r311106,r311109,r311110,r320579,r327063,r327064,:</title>
<updated>2018-03-16T05:29:30Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-16T05:29:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9fdbbb322563274a0962b7aec5f263974e76f31c'/>
<id>urn:sha1:9fdbbb322563274a0962b7aec5f263974e76f31c</id>
<content type='text'>
patch(1): replace strnlen() with a simpler strlen().
patch(1): add support for git generated diffs.
patch: rejname[] is also -r option buffer, and should be PATH_MAX.
patch: further cleanup to git-style diffs.
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>MFC r327826: patch(1): Don't check for NUL bytes in Plan A</title>
<updated>2018-01-27T06:20:27Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-01-27T06:20:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f81f7f8eca3f80ca058c38d3b3e68a94396d5dcd'/>
<id>urn:sha1:f81f7f8eca3f80ca058c38d3b3e68a94396d5dcd</id>
<content type='text'>
Plan A mmap()'s the entire input file and operates on it in memory. The
map(2) call succeeded, so we shouldn't need to bother checking for the NUL
byte as long as we're within our buffer space.

This was clearly intentional to match "the behavior of the original code",
but it creates a discrepancy between Plan A and Plan B that doesn't seem
sensible and it's not inherently wrong to allow a NUL byte.

This change was motivated by the gemspec in net/rubygem-grpc failing to
patch, despite the patch being generated with diff, because a NUL byte was
used as a delimiter in the header briefly in an otherwise text file.

An alternative was considered: to fallback to plan B if plan A won't process
the entire file due to a NUL byte, but I deemed this to be the better option
since plan A isn't failing due to memory limitations and will fail later on
if it's really dealing with a file it shouldn't be.
</content>
</entry>
<entry>
<title>MFC r326084: patch(1): don't assume match if we run out of context to check</title>
<updated>2018-01-18T21:53:07Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-01-18T21:53:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b3c902eda721781e628a520a6551fee7541acdbc'/>
<id>urn:sha1:b3c902eda721781e628a520a6551fee7541acdbc</id>
<content type='text'>
Patches with very little context (-U0 and -U1) could get misapplied if
the file to be patched changes and a hunk is no longer applicable. Matching
with fuzz would be attempted and default to a match when we unexpectedly ran
out of context.

This also affected patches with higher levels of context but had limited
actual context due to the hunk being located near the beginning/end of file.

PR:		74127
</content>
</entry>
<entry>
<title>MFC r324431: patch(1): Don't overrun line buffer in some cases</title>
<updated>2018-01-18T21:46:42Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-01-18T21:46:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=70cb0f24e6375c0a37d5aaf7b4e660b6d92611e5'/>
<id>urn:sha1:70cb0f24e6375c0a37d5aaf7b4e660b6d92611e5</id>
<content type='text'>
Patches like file.txt attached to PR 190195 with a final line formed
like "&gt;(EOL)" could cause a copy past the end of the current line buffer. In
the case of PR 191641, this caused a duplicate line to be copied into the
resulting file.

Instead of running past the end, treat it as if it were a blank line.

PR:		191641
</content>
</entry>
<entry>
<title>MFC r319676:</title>
<updated>2017-06-18T21:46:54Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-06-18T21:46:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=de08b4a9aceee943736abe41b12f87628cc99eee'/>
<id>urn:sha1:de08b4a9aceee943736abe41b12f87628cc99eee</id>
<content type='text'>
patch: if reading fails, do not go into infinite loop asking for a filename.

This can happen if no tty is available.

Obtained from:	OpenBSD (CVS rev 1.54)
Approved by:	re (marius)
</content>
</entry>
<entry>
<title>MFC r306560, r306561:</title>
<updated>2016-10-09T20:12:58Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-10-09T20:12:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a5e5007ae5a0a316c0e6dd4dbbf3a5e1f032f2de'/>
<id>urn:sha1:a5e5007ae5a0a316c0e6dd4dbbf3a5e1f032f2de</id>
<content type='text'>
patch(1): make some macros look boolean.

Minor cleanup inspired by a new patch(1) variant in schily tools.

For reference:
https://sourceforge.net/p/schillix-on/
</content>
</entry>
<entry>
<title>Adjust a type from r267490.</title>
<updated>2016-04-24T04:28:04Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-04-24T04:28:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3548708c4713b248a839f3ef8928dba5c9642a91'/>
<id>urn:sha1:3548708c4713b248a839f3ef8928dba5c9642a91</id>
<content type='text'>
Independent of the maximum length, the return type for strnlen(3)
is always size_t.
</content>
</entry>
<entry>
<title>patch(1): avoid signed integer overflow when debugging.</title>
<updated>2016-04-24T04:08:36Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-04-24T04:08:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2c4eed4723c3a739b85102d1ff911f06fe826fbc'/>
<id>urn:sha1:2c4eed4723c3a739b85102d1ff911f06fe826fbc</id>
<content type='text'>
Integer i is used to index p_end of type LINENUM (actually long).

Match the types.

MFC after:	5 days
</content>
</entry>
</feed>
