From owner-svn-src-all@freebsd.org Tue Apr 28 12:25:31 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 E8A372B807A; Tue, 28 Apr 2020 12:25:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 49BLT75rlKz4f5l; Tue, 28 Apr 2020 12:25:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 B806810C9; Tue, 28 Apr 2020 12:25:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f174.google.com with SMTP id e17so13627498qtp.7; Tue, 28 Apr 2020 05:25:31 -0700 (PDT) X-Gm-Message-State: AGi0PuYXXnyJe6ZQm6YvKRzQhdan+cyKi6kdBCNS1bo39itTljJc5Oeu tdxprVnWr0A82HfthDEXfnK3vbfdvGCOaeWKXyg= X-Google-Smtp-Source: APiQypJHcEOn7Z2c4J9nt2KFfihOPMw+WIImv35BL572rfblas11UkgYX451vmRjYZbIBZ5kEZRFzy6pKZAovhlffB4= X-Received: by 2002:ac8:7301:: with SMTP id x1mr28981090qto.53.1588076731052; Tue, 28 Apr 2020 05:25:31 -0700 (PDT) MIME-Version: 1.0 References: <202004201614.03KGEitC073880@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 28 Apr 2020 07:25:18 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360125 - in head/usr.bin/diff: . tests To: Jan Beich Cc: src-committers , svn-src-all , svn-src-head 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 12:25:32 -0000 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. Thanks, Kyle Evans