diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-07-01 17:58:19 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-07-01 17:58:19 +0200 |
commit | fd96cceded27d1372bdc1a851448d2d8613f60f3 (patch) | |
tree | 5b53f288a3379e260f46a65d08691fceec4a0ca3 /lib/git/objects/blob.py | |
parent | 6917ae4ce9eaa0f5ea91592988c1ea830626ac3a (diff) | |
parent | c3bd05b426a0e3dec8224244c3c9c0431d1ff130 (diff) | |
download | gitpython-fd96cceded27d1372bdc1a851448d2d8613f60f3.tar.gz |
Merge branch 'docs'
Diffstat (limited to 'lib/git/objects/blob.py')
-rw-r--r-- | lib/git/objects/blob.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/git/objects/blob.py b/lib/git/objects/blob.py index 8263e9a2..32f8c61c 100644 --- a/lib/git/objects/blob.py +++ b/lib/git/objects/blob.py @@ -14,21 +14,12 @@ 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): - """ :return:String describing the mime type of this file (based on the filename) + """ + :return: String describing the mime type of this file (based on the filename) :note: Defaults to 'text/plain' in case the actual file type is unknown. """ guesses = None if self.path: |