delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/21/10:45:18

X-Spam-Check-By: sourceware.org
Date: Wed, 21 Feb 2007 16:44:49 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: patch -e from stdin broken?
Message-ID: <20070221154449.GB15002@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1172072129 DOT 45dc66c1415be AT webmail4 DOT portugalmail DOT pt>
Mime-Version: 1.0
In-Reply-To: <1172072129.45dc66c1415be@webmail4.portugalmail.pt>
User-Agent: Mutt/1.4.2.2i
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

On Feb 21 15:35, pedro_alves AT portugalmail DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019