summaryrefslogtreecommitdiff
path: root/lib/git/objects/tree.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-03 16:35:33 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-03 16:35:33 +0100
commit3cb5ba18ab1a875ef6b62c65342de476be47871b (patch)
treed287a2fad9f87856b6937ffd4abaed66c9066da7 /lib/git/objects/tree.py
parentdbc18b92362f60afc05d4ddadd6e73902ae27ec7 (diff)
downloadgitpython-3cb5ba18ab1a875ef6b62c65342de476be47871b.tar.gz
object: renamed id attribute to sha as it in fact is always being rewritten as sha, even if the passed in id was a ref. This is done to assure objects are uniquely identified and will compare correctly
Diffstat (limited to 'lib/git/objects/tree.py')
-rw-r--r--lib/git/objects/tree.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/git/objects/tree.py b/lib/git/objects/tree.py
index 371c0dd3..413efdb8 100644
--- a/lib/git/objects/tree.py
+++ b/lib/git/objects/tree.py
@@ -43,8 +43,8 @@ class Tree(base.IndexObject, diff.Diffable):
tree_id = 040
- def __init__(self, repo, id, mode=0, path=None):
- super(Tree, self).__init__(repo, id, mode, path)
+ def __init__(self, repo, sha, mode=0, path=None):
+ super(Tree, self).__init__(repo, sha, mode, path)
def _set_cache_(self, attr):
if attr == "_cache":
@@ -150,7 +150,7 @@ class Tree(base.IndexObject, diff.Diffable):
def __repr__(self):
- return '<git.Tree "%s">' % self.id
+ return '<git.Tree "%s">' % self.sha
@classmethod
def _iter_recursive(cls, repo, tree, cur_depth, max_depth, predicate, prune ):