freebsd-dev/usr.bin/diff
Kyle Evans 67c907653e diff(1): don't reject specifying the same format multiple times
This may happen, for instance, if one happens to have an alias of diff to
diff -up and attempts to specify the amount of context on top of that.

Aliases like this may cause other problems, but if they're really not ever
generating non-unified diffs then we should at least not break that
use-case.

In addition, we'll now pick up a format mismatch if -p is specified with
!contextual && !unified && !unset.

Fix up a small trailing whitespace nit in the tests while we're here, and
add tests to make sure that we can double up all the formatting options.

Reported by:	jbeich
MFC after:	3 days
2020-04-28 14:33:33 +00:00
..
tests diff(1): don't reject specifying the same format multiple times 2020-04-28 14:33:33 +00:00
diff.1 diff: fix segfault with --tabsize and no/malformed argument 2020-02-13 20:23:55 +00:00
diff.c diff(1): don't reject specifying the same format multiple times 2020-04-28 14:33:33 +00:00
diff.h diff(1): reject conflicting formatting options 2020-04-20 16:14:44 +00:00
diffdir.c diff: Import fixes from OpenBSD 2018-06-09 21:09:24 +00:00
diffreg.c diff: implement -y (--side-by-side) along with -W and --suppress-common-lines 2020-02-07 10:17:13 +00:00
Makefile Isolate the pr(1) related code in its own source files 2018-06-09 20:24:17 +00:00
pr.c Fix memory leak 2018-06-12 16:42:11 +00:00
pr.h Isolate the pr(1) related code in its own source files 2018-06-09 20:24:17 +00:00
TODO Update diff(1) TODO removing what has been implemented 2020-02-07 10:18:01 +00:00
xmalloc.c asprintf returns -1, not an arbitrary value < 0. Also upon error the 2020-01-14 08:18:04 +00:00
xmalloc.h