delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/10/08/13:58:30

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <39E0B5A5.B1C9E9FE@phekda.freeserve.co.uk>
Date: Sun, 08 Oct 2000 18:57:57 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.17 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp-workers AT delorie DOT com
Subject: Re: Bizarre patch behaviour
References: <39E06A7C DOT 9BD27470 AT phekda DOT freeserve DOT co DOT uk> <3028-Sun08Oct2000173759+0300-eliz AT is DOT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Eli Zaretskii wrote:
> Take a look at the section named "NOTES FOR PATCH SENDERS" in the
> Patch man page.  You have violated one of the rules it sets: not to
> produce diffs where the OLD and the NEW files have different number of
> slashes.  This is especially important if the patch is supposed to be
> applied with the -pN switch, as you did.

Oops, you are quite right. The info docs don't seem to mention this, as
far as I can tell. I wonder if this should be added to:

    info diffutils 'Making Patches'

just to clarify for ignorant people like me. ;)

> > Why does it apply all differences to files present in the original
> > distribution OK and then change direction for the new files?
> 
> Because Patch uses some complicated guesswork to find out which file
> to apply the patch to (it's not easy, contrary to how it sounds), and
> that guesswork sometimes breaks.

Oh, OK, I thought it only used the first filename and ignored the second.
OTOH if every file patch is considered to be a patch in its own right,
then this doesn't make sense. I suppose you have to consider each one
separately, in case the patch was made by concatenating several single
file patches. Hmmm, interesting.

Thanks for clarifying - user error, as usual. Bye,

-- 
Richard Dawe
[ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]

- Raw text -


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