From: Catalin Marinas Date: Fri, 15 Sep 2006 18:24:01 +0000 (+0100) Subject: Allow empty commit messages X-Git-Tag: v0.14.3~466 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/75a221d2f3dcfa4b8af1e994ba9ea6d6f7826a45 Allow empty commit messages Signed-off-by: Catalin Marinas --- diff --git a/stgit/git.py b/stgit/git.py index 907c82d..2c73bb8 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -436,7 +436,9 @@ def commit(message, files = None, parents = None, allowempty = False, raise GitException, 'No changes to commit' # get the commit message - if message[-1:] != '\n': + if not message: + message = '\n' + elif message[-1:] != '\n': message += '\n' must_switch = True