[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Misdiffing of files without newlines

From: Paul Eggert
Subject: Re: Misdiffing of files without newlines
Date: Fri, 11 Jul 2003 15:22:02 -0700 (PDT)

> Date: Wed, 9 Jul 2003 12:13:37 -0400
> From: Andrew Moise
>   So if I do 'cvs diff -u' on a file that doesn't end in a newline, and
> there are changes near the end of the file, the diff is missing the
> '\ No newline at end of file' marker.  That's because CVS readds the
> missing newline sometimes in prepare_text_end().  Undoing the addition
> of this newline would require more knowledge of the codebase than I
> currently have, but I've done a fix that looks not too terrible to me.

Wouldn't it be better to have the CVS code look like the GNU diff
code?  GNU diff already has the behavior that you desire.

The changes that you're proposing to context.c etc. implement the
"\ No newline..." behavior in using a different method than diffutils,
but I don't see the advantage of the way that you're proposing.

At some point in this millennium I'd like to have a diffutils library
that CVS can use.  In the meantime it'd be nicer to keep the two
codebases close if possible.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]