bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch: questions: prereq and backup?


From: Hans-Bernhard Broeker
Subject: Re: patch: questions: prereq and backup?
Date: 22 Feb 2001 13:38:00 GMT

Gary Funck <address@hidden> wrote:

> I want my patch to work with both versions, just to avoid user
> confusion.  It appears to me that there may be some subtle
> differences in behavior, and I wanted to confirm it here.  The
> 2.1 version appeared to back up original files to *.orig by
> default (so, no -b is required).  But the newer version (2.5.4)
> appears *not* to back up originals by default.  

To be precise: current patch does not create backup files by default,
but it will if there's anything fishy about the patch (i.e. if 'fuzz'
had to be added to allow the patch applied, or if any hunk got
rejected). I.e. the new option --backup-if-mismatch is now the
default behaviour.

POSIX seems to request yet another default behaviour: no backups at
all, ever. 

But I don't think you can just use option '-b' unguarded, as its syntax
has changed between patch version, from:

       -b suff, --suffix=suff
            causes suff to be interpreted as the backup extension, to  be
            used in place of ".orig" or "~".

in version 2.1 to

  -b  or  --backup
     Make backup files.  That is, when patching a file, rename or copy the
     original instead of removing it.  When backing up a file that does not

I.e.: no, you can't unify the two by a simple command line argument.



-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]