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


Brian Dessent wrote:
>Arend-Jan Westhoff wrote:
>> 
>> Noticed that when diff is run with two differing files,
>> one with and one without a directory specifier:
>>         diff a someDir\b
>> then all lines are reported as different.
>> Whereas when both have a directory specifier:
>>         diff .\a someDir\b
>> output is normal.
>> (Filenames, argument order or using -d seem irrelevant.
>> Using / instead of \ makes output normal also:
>>         diff a someDir/b
>> output is normal.
>> Similarly when comparing a and someDir\a as:
>>         diff a someDir
>> output is also normal.
>> )
>
>I cannot reproduce this, either from a bash prompt or from cmd using
>your .bat file:
>
>$ cat a
>a
>a
>a
>
>$ cat somedir\\b
>a
>b
>a
>
>$ diff a somedir\\b
>2c2
>< a
>---
>> b
>
>The batch file outputs:
>
>This batch file: diffbugtest.bat
>
>diff (GNU diffutils) 2.8.7
>Written by Paul Eggert, Mike Haertel, David Hayes,
>Richard Stallman, and Len Tower.
>
>Copyright (C) 2004 Free Software Foundation, Inc.
>This is free software; see the source for copying conditions.  There is
>NO
>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>PURPOSE.
>2c2
>< a
>---
>> b
>2c2
>< a
>---
>> b
>
>
>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.
>
>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.
>
Have attached a cygcheck, though I am afraid it's rather large.

Attachment: cygcheck.out
Description: Text document

--
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]