]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r344677: patch(1): Exit successfully if we're fed a 0-length patch
authorkevans <kevans@FreeBSD.org>
Thu, 4 Apr 2019 17:21:30 +0000 (17:21 +0000)
committerkevans <kevans@FreeBSD.org>
Thu, 4 Apr 2019 17:21:30 +0000 (17:21 +0000)
commitf40819b14323ac45659b2a87469e22e62a632b7c
tree7da020804504f5da9026d72d4f45e2793d6490a2
parent8f94c0039a81fe87e54193473bed7bca6246b124
MFC r344677: patch(1): Exit successfully if we're fed a 0-length patch

This change is made in the name of GNU patch compatibility. If GNU patch is
fed a zero-length patch, it will exit successfully with no output. This is
used in at least one port to date (comms/wsjtx), and we break on this usage.

It seems unlikely that anyone relies on patch(1) calling their completely
empty patch garbage and failing, and GNU compatibility is a plus if it helps
with porting, so make the switch.
usr.bin/patch/common.h
usr.bin/patch/patch.c
usr.bin/patch/pch.c