Преглед на файлове

Add bin/dulwich support for reset command.

Jelmer Vernooij преди 11 години
родител
ревизия
dd5cf2abbb
променени са 1 файла, в които са добавени 13 реда и са изтрити 0 реда
  1. 13 0
      bin/dulwich

+ 13 - 0
bin/dulwich

@@ -229,6 +229,18 @@ def cmd_tag(args):
     porcelain.tag(".", args[0])
 
 
+def cmd_reset(args):
+    opts, args = getopt(args, "", ["hard", "soft", "mixed"])
+    mode = ""
+    if "--hard" in opts:
+        mode = "hard"
+    elif "--soft" in opts:
+        mode = "soft"
+    elif "--mixed" in opts:
+        mode = "mixed"
+    porcelain.tag(".", mode=mode, *args)
+
+
 commands = {
     "commit": cmd_commit,
     "commit-tree": cmd_commit_tree,
@@ -247,6 +259,7 @@ commands = {
     "add": cmd_add,
     "rm": cmd_rm,
     "show": cmd_show,
+    "reset": cmd_reset,
     "rev-list": cmd_rev_list,
     "tag": cmd_tag,
     }