Create index and worktree objects just once
[stgit] / stgit / commands / resolved.py
index 845eca0..4ee75b8 100644 (file)
@@ -31,8 +31,7 @@ usage = """%prog [options] [<files...>]
 
 Mark a merge conflict as resolved. The conflicts can be seen with the
 'status' command, the corresponding files being prefixed with a
-'C'. This command also removes any <file>.{ancestor,current,patched}
-files."""
+'C'."""
 
 directory = DirectoryHasRepository(needs_current_series = False)
 options = [make_option('-a', '--all',
@@ -77,7 +76,9 @@ def func(parser, options, args):
                 raise CmdException, 'No conflicts for "%s"' % filename
 
     # resolved
-    for filename in files:
-        if options.interactive:
+    if options.interactive:
+        for filename in files:
             interactive_merge(filename)
-        resolved(filename, options.reset)
+            git.resolved([filename])
+    else:
+        git.resolved(files, options.reset)