So after a few discussions I propose to add --dry-run as synonim for -C
in our patch(1). Quick summary:

  * GNU got --dry-run earlier than us;
  * --dry-run way more popular name than --check for such functionality;
  * FreeBSD and NetBSD has the same for a long time already;
  * We don't care about long option names generally, anyway.

On the second option, --binary, since we have no functionality and
I see no demand for it, lets just keep things as is. Failing with
"unkonwn option" message is clear indicator that requested functionality
isn't supported.

Builds and runs on (almost) -CURRENT. Okay or not?

--
  WBR,
    Vadim Zhukov


Index: patch.c
===================================================================
RCS file: /cvs/src/usr.bin/patch/patch.c,v
retrieving revision 1.65
diff -u -p -r1.65 patch.c
--- patch.c     7 Apr 2018 14:55:13 -0000       1.65
+++ patch.c     22 Jun 2018 09:12:53 -0000
@@ -454,6 +454,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'},

Reply via email to