diff options
Diffstat (limited to 'git/db.py')
-rw-r--r-- | git/db.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -23,7 +23,7 @@ __all__ = ('GitCmdObjectDB', 'GitDB' ) class GitCmdObjectDB(LooseObjectDB): """A database representing the default git object store, which includes loose objects, pack files and an alternates file - + It will create objects only in the loose object database. :note: for now, we use the git command to do all the lookup, just until he have packs and the other implementations @@ -32,19 +32,19 @@ class GitCmdObjectDB(LooseObjectDB): """Initialize this instance with the root and a git command""" super(GitCmdObjectDB, self).__init__(root_path) self._git = git - + def info(self, sha): hexsha, typename, size = self._git.get_object_header(bin_to_hex(sha)) return OInfo(hex_to_bin(hexsha), typename, size) - + def stream(self, sha): """For now, all lookup is done by git itself""" hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(sha)) return OStream(hex_to_bin(hexsha), typename, size, stream) - - + + # { Interface - + def partial_to_complete_sha_hex(self, partial_hexsha): """:return: Full binary 20 byte sha from the given partial hexsha :raise AmbiguousObjectName: @@ -57,5 +57,5 @@ class GitCmdObjectDB(LooseObjectDB): except (GitCommandError, ValueError): raise BadObject(partial_hexsha) # END handle exceptions - + #} END interface |