svn commit: r360125 - in head/usr.bin/diff: . tests
Jan Beich
jbeich at FreeBSD.org
Tue Apr 28 11:52:35 UTC 2020
Kyle Evans <kevans at FreeBSD.org> writes:
> Author: kevans
> Date: Mon Apr 20 16:14:44 2020
> New Revision: 360125
> URL: https://svnweb.freebsd.org/changeset/base/360125
>
> Log:
> diff(1): reject conflicting formatting options
>
> This matches GNU diff(1) behavior and, more importantly, eliminates any
> source of confusion if multiple formatting options are specified.
>
> Note that the committed diff differs slightly from the submitted: I've
> modified it so that we initialize diff_format to something that isn't an
> accepted format option so that we can also reject --normal -c and -c
> --normal, which would've otherwise been accepted because the default was
> --normal. After option parsing we default it to D_NORMAL if it's still
> unset.
>
> PR: 243975
> Submitted by: fehmi noyan isi
> MFC after: 1 week
Appears to break ability to specify number of context lines e.g.,
$ diff -U999 /usr/include/sha256.h /usr/include/sha512.h
error: conflicting output format options.
usage: diff [-aBbdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]
[...]
More information about the svn-src-all
mailing list