summaryrefslogtreecommitdiff
path: root/lib/git/db.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-22 00:05:37 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-22 00:05:37 +0200
commit69dd8750be1fbf55010a738dc1ced4655e727f23 (patch)
tree1d49d5ff0218a358d63ae1cab93c56731cc5ea46 /lib/git/db.py
parent1044116d25f0311033e0951d2ab30579bba4b051 (diff)
downloadgitpython-69dd8750be1fbf55010a738dc1ced4655e727f23.tar.gz
index.write_tree: initial version implemented, although its not yet working correctly, a test to explicitly compare the git version with the python implementation is still missing
Tree and Index internally use 20 byte shas, converting them only as needed to reduce memory footprint and processing time objects: started own 'fun' module containing the most important tree functions, more are likely to be added soon
Diffstat (limited to 'lib/git/db.py')
-rw-r--r--lib/git/db.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/git/db.py b/lib/git/db.py
index f3698b76..b7cf0fc7 100644
--- a/lib/git/db.py
+++ b/lib/git/db.py
@@ -4,9 +4,12 @@ from gitdb.base import (
OStream
)
+from gitdb.util import to_hex_sha
+
from gitdb.db import GitDB
from gitdb.db import LooseObjectDB
+
__all__ = ('GitCmdObjectDB', 'GitDB' )
#class GitCmdObjectDB(CompoundDB, ObjectDBW):
@@ -24,11 +27,11 @@ class GitCmdObjectDB(LooseObjectDB):
self._git = git
def info(self, sha):
- t = self._git.get_object_header(sha)
+ t = self._git.get_object_header(to_hex_sha(sha))
return OInfo(*t)
def stream(self, sha):
"""For now, all lookup is done by git itself"""
- t = self._git.stream_object_data(sha)
+ t = self._git.stream_object_data(to_hex_sha(sha))
return OStream(*t)