From owner-svn-src-all@freebsd.org Tue Apr 28 14:34:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 074052BAE9F for ; Tue, 28 Apr 2020 14:34:55 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49BPLQ6F99z3JVV for ; Tue, 28 Apr 2020 14:34:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C6BFA20D9 for ; Tue, 28 Apr 2020 14:34:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f41.google.com with SMTP id y19so10447930qvv.4 for ; Tue, 28 Apr 2020 07:34:54 -0700 (PDT) X-Gm-Message-State: AGi0PuZjHLzxOpRlnFwue/q3rU6IP5MnQ5JGcieqW1g4rw+92+cfLooV xiQNBxUEm9EzDlsLC6cmFX6vKur5Bk01TV7Ep+U= X-Received: by 2002:a05:6214:1853:: with SMTP id d19mt28359565qvy.150.1588084494312; Tue, 28 Apr 2020 07:34:54 -0700 (PDT) MIME-Version: 1.0 References: <202004201614.03KGEitC073880@repo.freebsd.org> <20200428144255.1b75d9b5@ernst.home> In-Reply-To: From: Kyle Evans Date: Tue, 28 Apr 2020 09:34:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360125 - in head/usr.bin/diff: . tests Cc: Jan Beich , Gary Jennejohn , svn-src-head , svn-src-all , src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2020 14:34:55 -0000 On Tue, Apr 28, 2020 at 7:58 AM Kyle Evans wrote: > > On Tue, Apr 28, 2020 at 7:55 AM Jan Beich wrote: > > > > Gary Jennejohn writes: > > > > > On Tue, 28 Apr 2020 07:25:18 -0500 > > > Kyle Evans wrote: > > > > > >> On Tue, Apr 28, 2020 at 6:52 AM Jan Beich wrote: > > >> > > > >> > Kyle Evans 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. > > Whoops, *facepalm*, you certainly shouldn't be restricted from > specifying the same output style multiple times. Will fix ASAP. > As of r360437, this is no longer an issue and the test case has been amended. Apologies for the hassle. =-)