From 3cb5ba18ab1a875ef6b62c65342de476be47871b Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 3 Nov 2009 16:35:33 +0100 Subject: 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 --- lib/git/objects/tree.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/git/objects/tree.py') 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 '' % self.id + return '' % self.sha @classmethod def _iter_recursive(cls, repo, tree, cur_depth, max_depth, predicate, prune ): -- cgit v1.2.1