This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug diff 2.8.7: Separate dir


On Fri, 4 Mar 2005, Igor Pechtchanski wrote:

> On Fri, 4 Mar 2005, Brian Dessent wrote:
>
> > I cannot reproduce this, either from a bash prompt or from cmd using
> > your .bat file:
>
> I can reproduce this (even under bash).  All you need is a textmode mount
> and files with CRLF line endings.

Upon re-reading this, the above seems to imply that this is a bug.  I just
want to clarify that, as explained below, this is NOT a bug, but intended
behavior.  The "workaround" mentioned below is for a faulty setup
(textmode mounts and '\'s in paths), not for any perceived bug.
	Igor

> > It's probably a textmode/binmode issue, though I don't know why
> > switching between '\' and '/' as the path seperator changes it --
> > although the Cygwin path handling code is complex and I can't pretend to
> > understand it.
>
> Having a '\' in a filename bypasses Cygwin's mounts and uses regular
> Windows mechanisms for opening the file.  Reading a file on a textmode
> mount will translate CRLF line endings to normal LFs.  No wonder 'diff'
> is confused.
>
> > There was no attached cygcheck so I don't know how your mounts are setup
> > but from what I've read, using textmode mounts with tools like cvs and
> > diff is a recipe for disaster.
>
> Yep.  One possible workaround is to use the '--strip-trailing-cr' option
> to diff, which will make it insensitive to textmode/binmode line endings.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]