diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-04 11:28:45 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-04 11:28:45 +0100 |
commit | f9bbdc87a7263f479344fcf67c4b9fd6005bb6cd (patch) | |
tree | 3745116f7bd31612a240c05002a3cd2e9f0eb5f8 /lib/git | |
parent | 43ab2afba68fd0e1b5d138ed99ffc788dc685e36 (diff) | |
download | gitpython-f9bbdc87a7263f479344fcf67c4b9fd6005bb6cd.tar.gz |
tree: parsing would fail when symlinks where encountered. This has been fixed
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/objects/tree.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |