This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: patch -e from stdin broken?
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 21 Feb 2007 16:44:49 +0100
- Subject: Re: patch -e from stdin broken?
- References: <1172072129.45dc66c1415be@webmail4.portugalmail.pt>
- Reply-to: cygwin at cygwin dot com
On Feb 21 15:35, pedro_alves@portugalmail.pt wrote:
> Hi guys,
>
> While looking at why 'quilt annotate' is broken in Cygwin, I found
> something fishy on 'patch' in ed mode. Looks like reading the patch
> from stdin is broken. Reading the patch from a file with -i works
> ok. Here is how to reproduce:
>
> $ touch a.txt
>
> $ cat << EOF > b.txt
> > a new line
> > EOF
>
> $ diff -e a.txt b.txt > ab.diff
>
> $ cat ab.diff
> 0a
> a new line
The diff file also contains a third line with just a single dot.
If I feed this to patch from stdin, everything's fine:
$ patch < ab.diff
can't find file to patch at input line 1
Perhaps you used the wrong -p or --strip option?
File to patch: a.txt
$ cat a.txt
a new line
$
Where's the problem exactly?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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/