Re: diff & patch problem with 'No newline'

[ Available lists | Index of freebsd-standards | Month of Apr 2002 | Week of 25 Apr 2002 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
M. Warner Losh <imp@village.org>
Date
25 Apr 2002 19:22:43
Subject
Re: diff & patch problem with 'No newline'
Message-ID
20020425.202217.82927028.imp@village.org


[ Hide this part ]
In message: <20020425210035.A43192@espresso.q9media.com>
Mike Barcroft <mike@FreeBSD.ORG> writes:
: Garance A Drosihn <drosih@rpi.edu> writes:
: > And now, a mere two months later, I finally looked into it.
: > Changing 'diff' is trivial, but the main issue is changing
: > 'patch' to match.
: >
: > I found out that NetBSD had made changes to 'patch' so it
: > does understand these lines. I copy&pasted those changes
: > into our version, and it looks like it works right. The
: > patch is pretty straightforward, and I would like to get
: > it into our patch in for 4.6-release (along with the minor
: > change to 'diff'). Any objections?
:
: Yes. I still maintain that files without a trailing new line are not
: "text files", and should therefore be treated as binary files. Even
: if we did consider these to be "text files", no standards that I'm
: aware of define the behavior for this situation, so a non-standard
: patch utility would be required to interpret these extensions. This
: would make our generated diffs unportable in the same way as some of
: the other vendors you mentioned as having this feature.

There's lots of software (well, OK, subversion) that depends on the
old, historical behavior. The historical behavior of diff has been to
include the "this file doesn't end with a newline" message, not what
FreeBSD hacked it to do.

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message



Elapsed time: 0.250 seconds