]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
diff: don't force the format to 'context' with -p immediately
authorkevans <kevans@FreeBSD.org>
Tue, 27 Oct 2020 12:27:26 +0000 (12:27 +0000)
committerkevans <kevans@FreeBSD.org>
Tue, 27 Oct 2020 12:27:26 +0000 (12:27 +0000)
commitf1546fceef93c013d15c5a91e18ad98cd89c8d85
tree146925f5a6d95c3b4d5bdbb42d1d900a502ca06d
parente87228c6008bded0a9a1f058a6faf5a67e5d0e38
diff: don't force the format to 'context' with -p immediately

Instead, leave the fomat as unspecified (if it hasn't been) and use the
-p flag as a hint to 'context' if no other formatting option is specified.

This fixes `diff -purw`, used frequently by emaste, and matches the behavior
of its GNU counterpart.

PR: 250015
Reviewed by: emaste
MFC after: 1 week
usr.bin/diff/diff.c