Browse Source

Support more capabilities.

Jelmer Vernooij 16 years ago
parent
commit
ca1b9a559e
1 changed files with 10 additions and 1 deletions
  1. 10 1
      dulwich/client.py

+ 10 - 1
dulwich/client.py

@@ -62,7 +62,8 @@ class GitClient(object):
 
     """
 
-    def __init__(self, fileno, read, write, thin_packs=None):
+    def __init__(self, fileno, read, write, thin_packs=None, include_tag=None, 
+                 shallow=None):
         self.proto = Protocol(read, write)
         self.fileno = fileno
         self._capabilities = list(CAPABILITIES)
@@ -70,6 +71,14 @@ class GitClient(object):
             thin_packs = True
         if thin_packs:
             self._capabilities.append("thin-pack")
+        if include_tag is None:
+            include_tag = True
+        if include_tag:
+            self._capabilities.append("include-tag")
+        if shallow is None:
+            shallow = True
+        if shallow:
+            self._capabilities.append("shallow")
 
     def capabilities(self):
         return " ".join(self._capabilities)