Rename "stg assimilate" to "stg repair"
[stgit] / stgit / main.py
index 8e00217..a03447f 100644 (file)
@@ -60,7 +60,6 @@ class Commands(dict):
 commands = Commands({
     'add':              'add',
     'applied':          'applied',
-    'assimilate':       'assimilate',
     'branch':           'branch',
     'delete':           'delete',
     'diff':             'diff',
@@ -89,6 +88,7 @@ commands = Commands({
     'rebase':           'rebase',
     'refresh':          'refresh',
     'rename':           'rename',
+    'repair':           'repair',
     'resolved':         'resolved',
     'rm':               'rm',
     'series':           'series',
@@ -109,7 +109,6 @@ repocommands = (
     )
 stackcommands = (
     'applied',
-    'assimilate',
     'branch',
     'clean',
     'commit',
@@ -122,6 +121,7 @@ stackcommands = (
     'pull',
     'push',
     'rebase',
+    'repair',
     'series',
     'sink',
     'top',
@@ -271,14 +271,12 @@ def main():
         directory.setup()
         config_setup()
 
-        # 'clone' doesn't expect an already initialised GIT tree. A Series
-        # object will be created after the GIT tree is cloned
-        if cmd != 'clone':
+        # Some commands don't (always) need an initialized series.
+        if directory.needs_current_series:
             if hasattr(options, 'branch') and options.branch:
                 command.crt_series = Series(options.branch)
             else:
                 command.crt_series = Series()
-            stgit.commands.common.crt_series = command.crt_series
 
         command.func(parser, options, args)
     except (StgException, IOError, ParsingError, NoSectionError), err: