diff options
author | pfg <pfg@FreeBSD.org> | 2014-06-15 16:38:17 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-06-15 16:38:17 +0000 |
commit | 49488945482d834365417dc41caef0386a2a2b0a (patch) | |
tree | 9f4cba248164838763df0d60d2f42b63f3c63299 /usr.bin | |
parent | c9e2f27302b757a12d8a346c00fe9a5555175f8c (diff) | |
download | FreeBSD-src-49488945482d834365417dc41caef0386a2a2b0a.zip FreeBSD-src-49488945482d834365417dc41caef0386a2a2b0a.tar.gz |
patch: add dry-run alias for compatibility with other implementations.
Other implementations of patch(1), including GNU patch and "svn patch"
have a --dry-run option which does the same as our -C or --check
option.
Add a new alias to make our implementation more compatible.
MFC after: 1 week
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/patch/patch.1 | 4 | ||||
-rw-r--r-- | usr.bin/patch/patch.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/patch/patch.1 b/usr.bin/patch/patch.1 index 36ba860..aac69de 100644 --- a/usr.bin/patch/patch.1 +++ b/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 12, 2014 +.Dd June 15, 2014 .Dt PATCH 1 .Os .Sh NAME @@ -107,7 +107,7 @@ This is equivalent to specifying This option is currently the default, unless .Fl -posix is specified. -.It Fl C , Fl Fl check +.It Fl C , Fl Fl check , Fl Fl dry-run Checks that the patch would apply cleanly, but does not modify anything. .It Fl c , Fl Fl context Forces diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index 7a53284..85daf7f 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -469,6 +469,7 @@ get_some_switches(void) {"context", no_argument, 0, 'c'}, {"debug", required_argument, 0, 'x'}, {"directory", required_argument, 0, 'd'}, + {"dry-run", no_argument, 0, 'C'}, {"ed", no_argument, 0, 'e'}, {"force", no_argument, 0, 'f'}, {"forward", no_argument, 0, 'N'}, |