]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
diff: don't force the format to 'context' with -p immediately
authorKyle Evans <kevans@FreeBSD.org>
Tue, 27 Oct 2020 12:27:26 +0000 (12:27 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 27 Oct 2020 12:27:26 +0000 (12:27 +0000)
commitb0d30b27f0dac95224dfdb7a242dbbbe1e19930c
tree146925f5a6d95c3b4d5bdbb42d1d900a502ca06d
parent1f474190fc280d4a4ef0c214e4d7fff0d1237e22
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