NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/43517: patch(1) does not fail when used with unknown option
>Number: 43517
>Category: bin
>Synopsis: patch(1) does not fail when used with unknown option
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 25 16:25:00 +0000 2010
>Originator: Arnaud Lacombe
>Release: netbsd-5
>Organization:
n/a
>Environment:
NetBSD bla 5.99.25 NetBSD 5.99.25 (GENERIC) #0: Tue Apr 27 22:29:06 EDT 2010
al@bla:/misc/build/obj/sys/arch/i386/compile/GENERIC i386
>Description:
When used with unknown options, patch(1) returns a success, however, patch is
not applied.
>How-To-Repeat:
% echo foo > orig
% echo bar > changed
% diff -u orig changed > change
% patch --no-backup-if-mismatch < change
patch: unknown option -- no-backup-if-mismatch
usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory]
[-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]
[-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]
[--posix] [origfile [patchfile]]
patch <patchfile
% echo $?
0
% cat orig
foo
% patch < change
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- orig 2010-06-25 12:13:51.000000000 -0400
|+++ changed 2010-06-25 12:14:02.000000000 -0400
--------------------------
Patching file orig using Plan A...
Hunk #1 succeeded at 1.
done
% echo $?
0
% cat orig
bar
>Fix:
should be trivial :)
Home |
Main Index |
Thread Index |
Old Index