]> thyrsus.com Git - src.git/commitdiff
Detect malformed comments rather than byte-stuffing.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 8 Nov 2014 16:02:25 +0000 (11:02 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 8 Nov 2014 16:02:25 +0000 (11:02 -0500)
src

diff --git a/src b/src
index f529d5cb998807c3848ef7adc19ea428758a4643..c56df667cadc61f31d2ea183d3dd317e53ac1e3b 100755 (executable)
--- a/src
+++ b/src
@@ -445,7 +445,8 @@ def commit_method(*args):
                commentfile = "/tmp/src%dtmp" % os.getpid()
                do_or_die(editor + " " + commentfile, loud=True)
                comment = open(commentfile).read()
-           if metadata.delimiter in comment:
+           # Delimiter won't be set just after add
+           if metadata.delimiter and metadata.delimiter in comment:
                croak("malformed comment")
            if not comment.endswith("\n"):
                comment += "\n"