]> thyrsus.com Git - src.git/commitdiff
Guard against people innocently typing -m"foo" a la RCS.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 18 Nov 2014 22:00:11 +0000 (17:00 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 18 Nov 2014 22:00:11 +0000 (17:00 -0500)
All regression tests pass.

src

diff --git a/src b/src
index 7961d29849407544e0c944883ed4ab79a0535f75..00b6ec7d67e3c37619730fdae3e279c34935beb3 100755 (executable)
--- a/src
+++ b/src
@@ -895,6 +895,8 @@ The cut line and things below it will not become part of the comment text.
                     croak("%s -f requires a following filename argument" % legend)
                 except OSError:
                     croak("couldn't open %s." % args[1])
+            elif args[0].startswith("-"):
+                croak("unexpected %s option" % args[0])
     def edit(self, content="", trailer=""):
         "Interactively edit a comment if required, then prepare for handoff."
         if self.leader and not self.force_edit: