summaryrefslogtreecommitdiff
path: root/lib/git/objects/blob.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-29 20:16:37 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-29 20:16:37 +0200
commit18be0972304dc7f1a2a509595de7da689bddbefa (patch)
tree9f23a910a68120e64419ee8c03f37ed0790ab621 /lib/git/objects/blob.py
parent77cd6659b64cb1950a82e6a3cccdda94f15ae739 (diff)
downloadgitpython-18be0972304dc7f1a2a509595de7da689bddbefa.tar.gz
Removed blob.data property as there is no real reason for an exception to the rule of trying not to cache possibly heavy data. The data_stream method should be used instead
Diffstat (limited to 'lib/git/objects/blob.py')
-rw-r--r--lib/git/objects/blob.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/git/objects/blob.py b/lib/git/objects/blob.py
index d0ef54c7..32f8c61c 100644
--- a/lib/git/objects/blob.py
+++ b/lib/git/objects/blob.py
@@ -14,17 +14,7 @@ class Blob(base.IndexObject):
DEFAULT_MIME_TYPE = "text/plain"
type = "blob"
- __slots__ = "data"
-
- def _set_cache_(self, attr):
- if attr == "data":
- ostream = self.repo.odb.stream(self.binsha)
- self.size = ostream.size
- self.data = ostream.read()
- # assert ostream.type == self.type, _assertion_msg_format % (self.binsha, ostream.type, self.type)
- else:
- super(Blob, self)._set_cache_(attr)
- # END handle data
+ __slots__ = tuple()
@property
def mime_type(self):