From owner-freebsd-standards Sat Feb 9 20:21: 5 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 6851037B417; Sat, 9 Feb 2002 20:21:00 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id g1A4Krc127566; Sat, 9 Feb 2002 23:20:54 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020210040158.A26957@chiark.greenend.org.uk> References: <200202091752.g19HqFP11551@green.bikeshed.org> <20020210040158.A26957@chiark.greenend.org.uk> Date: Sat, 9 Feb 2002 23:20:52 -0500 To: Tony Finch From: Garance A Drosihn Subject: Re: diff problem Cc: "Brian F. Feldman" , "M. Warner Losh" , fyre@orbital.wiretapped.net, tim@robbins.dropbear.id.au, freebsd-standards@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 4:01 AM +0000 2/10/02, Tony Finch wrote: >On Sat, Feb 09, 2002 at 09:46:00PM -0500, Garance A Drosihn wrote: >> >> I think that the [GNUish] behavior is the most useful and thus the most >> desirable one, from a purely practical point of view. The point of >> 'diff' is to tell the person the difference between two files, it is >> not there to slap the wrists of someone for using the "wrong tool" >> to work on some file. When it comes to following standards, freebsd >> can't claim to be following anyone that I can see. > >FreeBSD is following a pedantic reading of SUS. I meant, the behavior of any current operating system. You could argue that AIX and Solaris are following that pedantic reading too, but at least they tell the user (via stderr) about that missing newline. It should also be acknowledged that the pedantic reading of diff does not acknowledge this issue at all. Ie, if you follow the exact output formats as specified, then there *is* no way to indicate the situation where the last line is missing a newline character. That's what I meant by the 'group 5' behavior being the most useful. It's the only one which allows someone to recreate the second file by using the first file and the output from 'diff'. That should count for something. That marker line isn't a change for the sake of change, it was done to address an oversight and a shortcoming in the standard as written. >It is also useful to refer to `patch` when we talk about `diff`, since >the former is defined (in SUS) in terms of the latter. And you also >must consider how these tools interact with the revision management >systems that the project uses. This is true. As I mentioned, if we need to fix patch to understand the extra line, then we should do that. Chances are we should do that anyway, in case someone sends us a patch generated from the diff on the list of operating systems I listed as 'group 5'. If no other operating system had this extra marker line, then I would be reluctant to have FreeBSD add it. However, given how much of the unix world considers that extra line as "standard", including the two other BSD's, then I think it's a good idea for us to also support it. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message