From owner-svn-src-head@freebsd.org Tue Apr 28 12:58:17 2020 Return-Path: Delivered-To: svn-src-head@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 C7A7A2B8A69; Tue, 28 Apr 2020 12:58:17 +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 49BMBx4zZqz3C45; Tue, 28 Apr 2020 12:58:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 9824F147F; Tue, 28 Apr 2020 12:58:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f54.google.com with SMTP id q2so10287275qvd.1; Tue, 28 Apr 2020 05:58:17 -0700 (PDT) X-Gm-Message-State: AGi0PubK5ZBTjtr70JDhg708hmG9Ao3V1THKWKAOe6CbDGpBH5X4E84F ahScy9iVEVdynevkPzwsmthERHpAKx2kjnJVK+U= X-Google-Smtp-Source: APiQypIA6zVJvuri6dDpSgJNtg7/mD8mdUGgzuhC2QqMNi/qvYyZl6tm2GwH1HH30TIPG0NgsJJUddz6+0ImL1LvZTg= X-Received: by 2002:a05:6214:1853:: with SMTP id d19mr26983014qvy.150.1588078697114; Tue, 28 Apr 2020 05:58:17 -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 07:58:04 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360125 - in head/usr.bin/diff: . tests To: Jan Beich Cc: Gary Jennejohn , svn-src-head , svn-src-all , src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2020 12:58:17 -0000 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. Thanks, Kyle Evans