Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Apr 2020 14:55:44 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Gary Jennejohn <gljennjohn@gmail.com>
Cc:        Kyle Evans <kevans@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, src-committers <src-committers@freebsd.org>
Subject:   Re: svn commit: r360125 - in head/usr.bin/diff: . tests
Message-ID:  <wo5z-7orz-wny@FreeBSD.org>
In-Reply-To: <20200428144255.1b75d9b5@ernst.home> (Gary Jennejohn's message of "Tue, 28 Apr 2020 14:42:55 %2B0200")
References:  <202004201614.03KGEitC073880@repo.freebsd.org> <blnb-969s-wny@FreeBSD.org> <CACNAnaEZ4=G0SqHius9XfEpcQb4i3kgChmX3foUhsoP0noFnfw@mail.gmail.com> <20200428144255.1b75d9b5@ernst.home>

next in thread | previous in thread | raw e-mail | index | archive | help
Gary Jennejohn <gljennjohn@gmail.com> writes:

> On Tue, 28 Apr 2020 07:25:18 -0500
> Kyle Evans <kevans@freebsd.org> wrote:
>
>> On Tue, Apr 28, 2020 at 6:52 AM Jan Beich <jbeich@freebsd.org> wrote:
>> >
>> > Kyle Evans <kevans@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]
>> > [...]  
>> 
>> Hmm, bizarre. =-\ This example works on my machine, and I don't see
>> off-hand what would be preventing it for you:
>> 
>> root@viper:/usr/src/usr.bin/diff# diff -U999 /usr/include/sha256.h
>> /usr/include/sha512.h
>> --- /usr/include/sha256.h       2020-04-22 21:38:54.000000000 -0500
>> +++ /usr/include/sha512.h       2020-04-22 21:38:54.000000000 -0500
>> @@ -1,99 +1,99 @@
>>  /*-
>>   * Copyright 2005 Colin Percival
>>   * All rights reserved.
>>   *
>> [... omitted ...]
>> 
>> root@viper:/usr/src/usr.bin/diff# strings /usr/bin/diff | grep 'conflicting'
>> error: conflicting output format options.
>> 
>
> My /usr/bin/diff was built and installed on April 26, after this
> commit, and I don't see the error either.

Thanks for confirming. Looks like my "diff" was aliased to "diff -up".
Indeed, -u and -U are no longer compatible unlike GNU diff.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?wo5z-7orz-wny>