chiark / gitweb /
Fix the add and rm commands to fail if no patch is applied
[stgit] / stgit / commands / add.py
index fc9c5a73a29673f06b683a85134531ad6d9520ea..7f5a0b3a443070dae55a673d467d3cedd1284d21 100644 (file)
@@ -40,4 +40,7 @@ def func(parser, options, args):
     if len(args) < 1:
         parser.error('incorrect number of arguments')
 
+    if not crt_series.get_current():
+        raise CmdException, 'No patches applied'
+
     git.add(args)