From f9bbdc87a7263f479344fcf67c4b9fd6005bb6cd Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 4 Nov 2009 11:28:45 +0100 Subject: tree: parsing would fail when symlinks where encountered. This has been fixed --- lib/git/objects/tree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/git/objects/tree.py') diff --git a/lib/git/objects/tree.py b/lib/git/objects/tree.py index 413efdb8..fb292677 100644 --- a/lib/git/objects/tree.py +++ b/lib/git/objects/tree.py @@ -40,6 +40,7 @@ class Tree(base.IndexObject, diff.Diffable): # using ascii codes for comparison commit_id = 016 blob_id = 010 + symlink_id = 012 tree_id = 040 @@ -117,7 +118,7 @@ class Tree(base.IndexObject, diff.Diffable): mode |= type_id<<12 hexsha = sha_to_hex(sha) - if type_id == self.blob_id: + if type_id == self.blob_id or type_id == self.symlink_id: yield blob.Blob(self.repo, hexsha, mode, name) elif type_id == self.tree_id: yield Tree(self.repo, hexsha, mode, name) -- cgit v1.2.1