Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170596232
D3146.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D3146.id.diff
View Options
Index: head/usr.bin/patch/backupfile.c
===================================================================
--- head/usr.bin/patch/backupfile.c
+++ head/usr.bin/patch/backupfile.c
@@ -219,11 +219,11 @@
}
static const char *backup_args[] = {
- "never", "simple", "nil", "existing", "t", "numbered", 0
+ "none", "never", "simple", "nil", "existing", "t", "numbered", 0
};
static enum backup_type backup_types[] = {
- simple, simple, numbered_existing,
+ none, simple, simple, numbered_existing,
numbered_existing, numbered, numbered
};
Index: head/usr.bin/patch/patch.1
===================================================================
--- head/usr.bin/patch/patch.1
+++ head/usr.bin/patch/patch.1
@@ -21,7 +21,7 @@
.\"
.\" $OpenBSD: patch.1,v 1.27 2014/04/15 06:26:54 jmc Exp $
.\" $FreeBSD$
-.Dd June 15, 2014
+.Dd July 21, 2015
.Dt PATCH 1
.Os
.Sh NAME
@@ -39,7 +39,7 @@
.Op Fl o Ar out-file
.Op Fl p Ar strip-count
.Op Fl r Ar rej-name
-.Op Fl V Cm t | nil | never
+.Op Fl V Cm t | nil | never | none
.Op Fl x Ar number
.Op Fl z Ar backup-ext
.Op Fl Fl posix
@@ -296,8 +296,8 @@
.Nm
to interpret the patch file as a unified context diff (a unidiff).
.It Xo
-.Fl V Cm t | nil | never ,
-.Fl Fl version-control Cm t | nil | never
+.Fl V Cm t | nil | never | none ,
+.Fl Fl version-control Cm t | nil | never | none
.Xc
Causes the next argument to be interpreted as a method for creating
backup file names.
@@ -328,6 +328,8 @@
simple backups of the others.
.It Cm never , simple
Always make simple backups.
+.It Cm none
+Do not make backups.
.El
.It Fl v , Fl Fl version
Causes
Index: head/usr.bin/patch/patch.c
===================================================================
--- head/usr.bin/patch/patch.c
+++ head/usr.bin/patch/patch.c
@@ -109,6 +109,8 @@
/* true if -R was specified on command line. */
static bool reverse_flag_specified = false;
+static bool Vflag = false;
+
/* buffer holding the name of the rejected patch file. */
static char rejname[NAME_MAX + 1];
@@ -201,7 +203,7 @@
Argv = argv;
get_some_switches();
- if (backup_type == none) {
+ if (!Vflag) {
if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL)
v = getenv("VERSION_CONTROL");
if (v != NULL || !posix)
@@ -595,6 +597,7 @@
break;
case 'V':
backup_type = get_version(optarg);
+ Vflag = true;
break;
#ifdef DEBUGGING
case 'x':
@@ -631,8 +634,8 @@
fprintf(stderr,
"usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory]\n"
" [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]\n"
-" [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]\n"
-" [--posix] [origfile [patchfile]]\n"
+" [-r rej-name] [-V t | nil | never | none] [-x number]\n"
+" [-z backup-ext] [--posix] [origfile [patchfile]]\n"
" patch <patchfile\n");
my_exit(EXIT_FAILURE);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 6, 1:57 PM (4 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38414268
Default Alt Text
D3146.id.diff (2 KB)
Attached To
Mode
D3146: patch(1): Add -Vnone option to disable backup files
Attached
Detach File
Event Timeline
Log In to Comment