This is the mail archive of the cygwin@cygwin.com 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: patch(1) (Win32) and path separators


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/


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