Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Sender: outgoing mail@ (Unverified) Date: Sat, 05 Mar 2005 00:05:45 +0100 To: cygwin AT cygwin DOT com From: Arend-Jan Westhoff Subject: Bug diff 2.8.7: Separate dir Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <20050304230549.DF5187EC3@mail.phys.uu.nl> 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. ) As an illustration I have provide a sample batch file. (It creates up to two directories and two files): ********** @echo off setlocal set bugdir=showSeparateDirDiffBug if not exist %bugdir%\ md %bugdir% pushd %bugdir% set subdir=adir if not exist %subdir%\ md %subdir% set file1=a set file2=%subdir%\%file1% echo a>%file1% echo a>>%file1% echo a>>%file1% echo a>%file2% echo b>>%file2% echo a>>%file2% echo This batch file: %0 echo. diff --version rem Bug rem same: diff -d %file1% %file2% diff %file1% %file2% rem OK diff .\%file1% %file2% popd endlocal ********** I expect this to run as is on a not too old version of the Windows NT line of OS. On my Windows 2000 system this produces the following output: ************* This batch file: separateDirDiffBug.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. 1,3c1,3 < a < a < a --- > a > b > a 2c2 < a --- > b ************* Since the relevant factor seems to be a directory specifier this bug is probably Cygwin specific. (Btw I used a batch file so that the only Cygwin functionality used would be directly bug related for clarity. If there is a different format that would make it easier to add to the testscripts that are used for the automatic testing of these utilities please provide me with an example so I can model future similar bugreports along those lines.) -- 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/