summaryrefslogtreecommitdiff
path: root/lib/git/blob.py
diff options
context:
space:
mode:
authorMichael Trier <mtrier@gmail.com>2008-09-14 10:43:41 -0400
committerMichael Trier <mtrier@gmail.com>2008-09-14 10:43:41 -0400
commit5613079f2494808f048b81815bf708debf7339d2 (patch)
treebd1af57549b98d7c8b28cc1a867df75bfd542044 /lib/git/blob.py
parent3131d1a5295508f583ae22788a1065144bec3cee (diff)
parenta2856af1d9289ee086b10768b53b65e0fd13a335 (diff)
downloadgitpython-5613079f2494808f048b81815bf708debf7339d2.tar.gz
Merge branch 'master' of git://gitorious.org/git-python/nud
Diffstat (limited to 'lib/git/blob.py')
-rw-r--r--lib/git/blob.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/git/blob.py b/lib/git/blob.py
index 0b4b19c2..80d237d7 100644
--- a/lib/git/blob.py
+++ b/lib/git/blob.py
@@ -14,29 +14,33 @@ from commit import Commit
class Blob(object):
DEFAULT_MIME_TYPE = "text/plain"
- def __init__(self, repo, **kwargs):
+ def __init__(self, repo, id, mode=None, name=None):
"""
Create an unbaked Blob containing just the specified attributes
``repo``
is the Repo
- ``atts``
- is a dict of instance variable data
+ ``id``
+ is the git object id
+
+ ``mode``
+ is the file mode
+
+ ``name``
+ is the file name
Returns
GitPython.Blob
"""
- self.id = None
- self.mode = None
- self.name = None
+ self.repo = repo
+ self.id = id
+ self.mode = mode
+ self.name = name
+
self._size = None
self.data_stored = None
- self.repo = repo
- for k, v in kwargs.items():
- setattr(self, k, v)
-
@property
def size(self):
"""