From: Catalin Marinas Date: Mon, 24 Mar 2008 10:16:05 +0000 (+0000) Subject: Refuse to send empty patches X-Git-Tag: v0.15-rc1~257 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/3c04f4304c3213f832d8b3f2d50de4351cae395a?ds=sidebyside Refuse to send empty patches Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index 176c557..b4d4e18 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -514,6 +514,12 @@ def func(parser, options, args): else: raise CmdException, 'Incorrect options. Unknown patches to send' + out.start('Checking the validity of the patches') + for p in patches: + if crt_series.empty_patch(p): + raise CmdException, 'Cannot send empty patch "%s"' % p + out.done() + smtppassword = options.smtp_password or config.get('stgit.smtppassword') smtpuser = options.smtp_user or config.get('stgit.smtpuser') smtpusetls = options.smtp_tls or config.get('stgit.smtptls') == 'yes'