<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/patch/patch.1, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2019-12-03T18:55:09Z</updated>
<entry>
<title>MFC r351836, r351866, r354328: patch(1) /dev/null testing+improvement</title>
<updated>2019-12-03T18:55:09Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-12-03T18:55:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be3a0c5043ce6f6dd57ad55276e9b67447be6867'/>
<id>urn:sha1:be3a0c5043ce6f6dd57ad55276e9b67447be6867</id>
<content type='text'>
r351836: patch(1): add some basic tests

Summary:
- basic: test application of patches created by diff -u at the
  beginning/middle/end of file, which have differing amounts of context
  before and after chunks being added
- limited_ctx: stems from PR 74127 in which a rogue line was getting added
  when the patch should have been rejected. Similar behavior was
  reproducible with larger contexts near the beginning/end of a file. See
  r326084 for details
- file_creation: patch sourced from /dev/null should create the file
- file_nodupe: said patch sourced from /dev/null shouldn't dupe the contents
  when re-applied (personal vendetta, WIP, see comment)
- file_removal: this follows from nodupe; the reverse of a patch sourced
  from /dev/null is most naturally deleting the file, as is expected based
  on GNU patch behavior (WIP)

r351866: patch(1): fix the file removal test, strengthen it a bit

To remain compatible with GNU patch, we should ensure that once we're
removing empty files after a reversed /dev/null patch we don't remove files
that have been modified. GNU patch leaves these intact and just reverses the
hunk that created the file, effectively implying --remove-empty-files for
reversed /dev/null patches.

r354328: patch(1): give /dev/null patches special treatment

We have a bad habit of duplicating contents of files that are sourced from
/dev/null and applied more than once... take the more sane (in most ways)
GNU route and complain if the file exists and offer reversal options.

This still falls short a little bit as selecting "don't reverse, apply
anyway" will still give you duplicated file contents. There's probably other
issues as well, but awareness is the first step to happiness.
</content>
</entry>
<entry>
<title>Remove automatic checkout feature.</title>
<updated>2015-08-15T00:42:33Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2015-08-15T00:42:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e678759c309d8840ca620c77e6a6668b704c3220'/>
<id>urn:sha1:e678759c309d8840ca620c77e6a6668b704c3220</id>
<content type='text'>
Obtained from:	DragonFly via OpenBSD
Relnotes:	yes
MFC:		never
</content>
</entry>
<entry>
<title>patch(1): Add -Vnone option to disable backup files</title>
<updated>2015-07-21T22:57:27Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2015-07-21T22:57:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=300ca9a86e0642c9f9285ace20fbb7f4d2695ba8'/>
<id>urn:sha1:300ca9a86e0642c9f9285ace20fbb7f4d2695ba8</id>
<content type='text'>
Differential Revision:	https://reviews.freebsd.org/D3146
Reviewed by:	pfg
Approved by:	markj (mentor)
MFC after:	1 week
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
</content>
</entry>
<entry>
<title>patch: add dry-run alias for compatibility with other implementations.</title>
<updated>2014-06-15T16:38:17Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2014-06-15T16:38:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5e64d66ca4365c2a3ebc22a9fd4a333876d8e29a'/>
<id>urn:sha1:5e64d66ca4365c2a3ebc22a9fd4a333876d8e29a</id>
<content type='text'>
Other implementations of patch(1), including GNU patch and "svn patch"
have a --dry-run option which does the same as our -C or --check
option.

Add a new alias to make our implementation more compatible.

MFC after:	1 week
</content>
</entry>
<entry>
<title>Avoid zeroing during allocation.</title>
<updated>2014-06-12T19:01:57Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2014-06-12T19:01:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9f00ccd37adf049f01d6d72c210a0abcbc51077c'/>
<id>urn:sha1:9f00ccd37adf049f01d6d72c210a0abcbc51077c</id>
<content type='text'>
This change reverts a change from OpenBSD which made use of
calloc, and therefore wasted time initializing arrays that
will later be realloc'ed. Consistently use FreeBSD's
reallocf().

While here also merge the changes from OpenBSD's manpage
patch.1 Rev 1.27:
"patch was moved from user portability (UP) to base in issue 7
and is no longer optional"

MFC after:	1 week
</content>
</entry>
<entry>
<title>Remove contractions.</title>
<updated>2013-04-11T18:46:41Z</updated>
<author>
<name>Joel Dahl</name>
<email>joel@FreeBSD.org</email>
</author>
<published>2013-04-11T18:46:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b1edef175b19fca88a3962b63cdaa4a46fed87a5'/>
<id>urn:sha1:b1edef175b19fca88a3962b63cdaa4a46fed87a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title> - Refresh code with latest OpenBSD revisions.</title>
<updated>2013-01-29T20:05:16Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2013-01-29T20:05:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e56ef7d3586d1dea57990c7d94e260b54423ffc3'/>
<id>urn:sha1:e56ef7d3586d1dea57990c7d94e260b54423ffc3</id>
<content type='text'>
 - Remove $DragonFly$ tags as they are using git nowadays and VCS tags will
   not help merging.
 - Other changes to Copyright headers to make them consistent with other
   source code, we intend to fork from this point.

Reviewed by:	pfg
</content>
</entry>
<entry>
<title>- Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from</title>
<updated>2013-01-29T17:03:18Z</updated>
<author>
<name>Gabor Kovesdan</name>
<email>gabor@FreeBSD.org</email>
</author>
<published>2013-01-29T17:03:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2dd076b84bb1129d0a62b886a4e736a9344b3376'/>
<id>urn:sha1:2dd076b84bb1129d0a62b886a4e736a9344b3376</id>
<content type='text'>
  DragonflyBSD and install it as bsdpatch.  WITH_BSD_PATCH makes it
  default and installs GNU patch as gnupatch.

Submitted by:	pfg
Obtained from:	The DragonflyBSD Project
</content>
</entry>
<entry>
<title>kill the undead</title>
<updated>1997-07-13T14:26:00Z</updated>
<author>
<name>Peter Wemm</name>
<email>peter@FreeBSD.org</email>
</author>
<published>1997-07-13T14:26:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=65b3003d2db57c7e7f521f5f091ed7adbc151768'/>
<id>urn:sha1:65b3003d2db57c7e7f521f5f091ed7adbc151768</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Finish importing Lite2's src/usr.bin, except for ex, diff, grep, mail,</title>
<updated>1997-07-06T06:54:14Z</updated>
<author>
<name>Bruce Evans</name>
<email>bde@FreeBSD.org</email>
</author>
<published>1997-07-06T06:54:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c44252b6e8da46f58fd1882b9e7305a0f9114c16'/>
<id>urn:sha1:c44252b6e8da46f58fd1882b9e7305a0f9114c16</id>
<content type='text'>
pascal and vmstat.sparc.  All changed files on the vendor branch should
already have been imported.
</content>
</entry>
</feed>
