Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3DDA8DD9.1080608@ntlworld.com>
Date: Tue, 19 Nov 2002 19:15:37 +0000
From: Parish <parish@ntlworld.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021025 Netscape6/6.5
X-Accept-Language: en-gb, en-us
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: patch(1) (Win32) and path separators
References: <Pine.GSO.4.44.0211191349120.4275-100000@slinky.cs.nyu.edu>
In-Reply-To: <Pine.GSO.4.44.0211191349120.4275-100000@slinky.cs.nyu.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

On 19/11/2002 18:50 Igor Pechtchanski stood on a soap-box and preached
to the unwashed masses:

> Try 'patch -p0 --dry-run < filename'.

That did it. Thanks Igor :-)

I'd always assumed that without -p patch obeyed the path in the diff and 
that -p was only needed if, for example, the path in the diff was 
absolute and you needed a relative one. I didn't read all of the -p 
section in the manpage because it didn't seem to be what I needed, but 
/now/ I've read the last paragraph.

Previously I'd been editing the diffs to replace '/' with '\' so it 
worked; I guess what was happening was that patch was interpreting the 
whole string a filename but the shell, or the system calls patch uses, 
were interpreting the '\' as path separators and therefore it worked?

Thanks again for the help.

Regards,

Parish (who's going to make 'patch' an alias for 'patch -p0' ;-) )

> 	Igor




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

