summaryrefslogtreecommitdiff
path: root/git/db.py
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2014-11-16 20:15:50 +0100
committerAntoine Musso <hashar@free.fr>2014-11-16 20:46:41 +0100
commitf5d11b750ecc982541d1f936488248f0b42d75d3 (patch)
tree8be522510315f5adc32c0c55acd45dc1074294da /git/db.py
parent7aba59a2609ec768d5d495dafd23a4bce8179741 (diff)
downloadgitpython-f5d11b750ecc982541d1f936488248f0b42d75d3.tar.gz
pep8 linting (whitespaces)
W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file
Diffstat (limited to 'git/db.py')
-rw-r--r--git/db.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/git/db.py b/git/db.py
index 8caa85f6..0d12aeb4 100644
--- a/git/db.py
+++ b/git/db.py
@@ -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