Explorar o código

Fix 'remote add' command.

Jelmer Vernooij %!s(int64=7) %!d(string=hai) anos
pai
achega
2565870dc4
Modificáronse 1 ficheiros con 10 adicións e 5 borrados
  1. 10 5
      bin/dulwich

+ 10 - 5
bin/dulwich

@@ -501,11 +501,9 @@ class cmd_remote_add(Command):
         porcelain.remote_add('.', args[0], args[1])
 
 
-class cmd_remote(Command):
+class SuperCommand(Command):
 
-    subcommands = {
-        "add": cmd_remote_add,
-    }
+    subcommands = {}
 
     def run(self, args):
         if not args:
@@ -517,7 +515,14 @@ class cmd_remote(Command):
         except KeyError:
             print('No such subcommand: %s' % args[0])
             return False
-        return cmd_kls(args[1:])
+        return cmd_kls().run(args[1:])
+
+
+class cmd_remote(SuperCommand):
+
+    subcommands = {
+        "add": cmd_remote_add,
+    }
 
 
 class cmd_check_ignore(Command):