Explorar el Código

Add convenience function for accessing tags.

Jelmer Vernooij hace 16 años
padre
commit
fc4655bd9f
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      dulwich/repo.py

+ 4 - 0
dulwich/repo.py

@@ -32,6 +32,7 @@ from object_store import ObjectStore
 from objects import (
         ShaFile,
         Commit,
+        Tag,
         Tree,
         Blob,
         )
@@ -245,6 +246,9 @@ class Repo(object):
   def tree(self, sha):
     return self._get_object(sha, Tree)
 
+  def tag(self, sha):
+    return self._get_object(sha, Tag)
+
   def get_blob(self, sha):
     return self._get_object(sha, Blob)