Allow 'show' to display many patches
[stgit] / stgit / commands / add.py
index 7bad07c..7f5a0b3 100644 (file)
@@ -25,7 +25,11 @@ from stgit import stack, git
 
 
 help = 'add files or directories to the repository'
-usage = """%prog <files/dirs...>"""
+usage = """%prog [options] <files/dirs...>
+
+Add the files or directories passed as arguments to the
+repository. When a directory name is given, all the files and
+subdirectories are recursively added."""
 
 options = []
 
@@ -36,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)