bug-patch
[Top][All Lists]
Advanced

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

Re: [bug-patch] [PATCH] Let --posix cause --no-backup-if-mismatch


From: Andreas Gruenbacher
Subject: Re: [bug-patch] [PATCH] Let --posix cause --no-backup-if-mismatch
Date: Thu, 17 Feb 2011 09:18:01 +0100
User-agent: KMail/1.13.5 (Linux/2.6.34.7-0.4-desktop; KDE/4.4.4; x86_64; ; )

Tim,

On Wednesday 16 February 2011 18:32:26 Tim Waugh wrote:
> The documentation says that --no-backup-if-mismatch is the default when
> conforming to POSIX.  However, this is only the case when
> POSIXLY_CORRECT is set, not when --posix is given on the command line.

indeed, thanks.  Here is a simpler patch that also allows to explicitly turn
on --backup-if-mismatch with POSIXLY_CORRECT set or after --posix.
Okay to apply?

Thanks,
Andreas

diff --git a/src/patch.c b/src/patch.c
index 723a6e2..5746c54 100644
--- a/src/patch.c
+++ b/src/patch.c
@@ -923,6 +923,7 @@ get_some_switches (void)
                break;
            case CHAR_MAX + 7:
                posixly_correct = true;
+               backup_if_mismatch = false;
                break;
            case CHAR_MAX + 8:
                {



reply via email to

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