delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <20101001015713.M64956@ds.net> |
References: | <1842787202 DOT 20100930054004 AT mtu-net DOT ru> <20100930151033 DOT M76347 AT ds DOT net> <191883817 DOT 20101001042301 AT mtu-net DOT ru> <20101001015713 DOT M64956 AT ds DOT net> |
Date: | Fri, 1 Oct 2010 10:12:39 +0200 |
Message-ID: | <AANLkTikfp18iz5dmcXtE_LskjEqepXiUEMigq3TcT0bh@mail.gmail.com> |
Subject: | Re: diff issue |
From: | Csaba Raduly <rcsaba AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Andrey Repin wrote: >>>> When I'm comparing them with my usual macro >>>> diff -bdu -x "CVS" -x ".svn" -I "\$Id.*\$" -I "\$Revision.*\$" -I >>>> "\$Date.*\$" -I "\$Author.*\$" --strip-trailing-cr -- '1/backup.bat' >>>> 'backup.bat' >>>> It telling me that $Id$ lines are differ. >>>> But when I remove the "@echo off" from second file, it telling me >>>> that files are "identical" (the expected result). Did you get something similar to the following ? --- 1/backup.bat 2010-10-01 09:55:59.070190500 +0200 +++ backup.bat 2010-10-01 09:56:19.112194500 +0200 @@ -1,2 +1,3 @@ -rem $Id: backup.bat,v 1.1 2007/07/17 01:53:30 Daemon Exp $ +@echo off +rem $Id: backup.bat 10 2010-09-30 01:22:14Z anrdaemon $ rar a -ag-YYYY-MM-DD_HH-MM -- MinerTimer @MinerTimer.list I suspect that the -I switch told diff "do not start a difference if the line matches" rather than "consider this line to always match". So diff found the differing "@echo" line, and went into "it's a diff" mode until the identical "rar" line was found. So the "$Id" line is included in the diff even though it matches the -I switch. This behavio(u)r is counter-intuitive, but is probably required; otherwise the generated diff would be unusable for patch(1). On Fri, Oct 1, 2010 at 4:20 AM, Brian Wilson wrote: > > I'm not sure what the "--" argument is used for (before the file names) though. It's a convenient way to ensure that the command works with filenames beginning with a dash. -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ L w++$ tv+ b++ DI D++ 5++ Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |