bug-cvs
[Top][All Lists]
Advanced

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

Misdiffing of files without newlines


From: Andrew Moise
Subject: Misdiffing of files without newlines
Date: Wed, 9 Jul 2003 12:13:37 -0400
User-agent: Mutt/1.5.4i

  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.
  I'd like to see some fix for this behavior checked into CVS's tree
(the behavior is causing some CVS scriptery I maintain some amount of
grief.)  I've attached a patch to add test cases for diff behavior on
newlineless files ('diffnl-101' fails on the current cvs), and also my
proposed fix.  Does this approach look sensible to you folks?
  Please CC responses to me, as I'm not subscribed to the list.

Attachment: cvs-diffnl-test.patch
Description: Text document

Attachment: cvs-diffnl-fix.patch
Description: Text document


reply via email to

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