summaryrefslogtreecommitdiff
path: root/lib/git/blob.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-11 17:15:07 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-11 17:15:07 +0200
commit101fb1df36f29469ee8f4e0b9e7846d856b87daa (patch)
tree4cb16d8b325e5c1489b17a8a8682f36f1c9c20e0 /lib/git/blob.py
parent9374a916588d9fe7169937ba262c86ad710cfa74 (diff)
downloadgitpython-101fb1df36f29469ee8f4e0b9e7846d856b87daa.tar.gz
blob tests fixed to deal with changes to the Blob type
Diffstat (limited to 'lib/git/blob.py')
-rw-r--r--lib/git/blob.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/git/blob.py b/lib/git/blob.py
index d1b928cd..c6fb9c1d 100644
--- a/lib/git/blob.py
+++ b/lib/git/blob.py
@@ -43,10 +43,10 @@ class Blob(base.Object):
Returns
git.Blob
"""
- super(Blob,self).__init__(repo, id, "blob")
+ super(Blob,self).__init__(repo, id)
self.mode = mode
self.path = path
- self._data_stored = None
+ self._data_stored = type(None) # serves as marker to prevent baking in this case
@property
def data(self):
@@ -59,7 +59,7 @@ class Blob(base.Object):
NOTE
The data will be cached after the first access.
"""
- self._data_stored = self._data_stored or self.repo.git.cat_file(self.id, p=True, with_raw_output=True)
+ self._data_stored = ( self._data_stored is not type(None) and self._data_stored ) or self.repo.git.cat_file(self.id, p=True, with_raw_output=True)
return self._data_stored
@property