diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-16 19:19:57 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-16 19:19:57 +0200 |
commit | b372e26366348920eae32ee81a47b469b511a21f (patch) | |
tree | 9cee746944005c9c5d7adf284785a2fdb62dc2e4 /lib/git/objects/tree.py | |
parent | bb24f67e64b4ebe11c4d3ce7df021a6ad7ca98f2 (diff) | |
download | gitpython-b372e26366348920eae32ee81a47b469b511a21f.tar.gz |
added Diffable interface to objects.base, its used by Commit and Tree objects.
Diff class has been prepared to process raw input, but its not yet more than a frame
Diffstat (limited to 'lib/git/objects/tree.py')
-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 abfa9622..4d3e9ebd 100644 --- a/lib/git/objects/tree.py +++ b/lib/git/objects/tree.py @@ -15,7 +15,7 @@ def sha_to_hex(sha): assert len(hexsha) == 40, "Incorrect length of sha1 string: %d" % hexsha return hexsha -class Tree(base.IndexObject): +class Tree(base.IndexObject, base.Diffable): """ Tress represent a ordered list of Blobs and other Trees. Hence it can be accessed like a list. @@ -169,6 +169,7 @@ class Tree(base.IndexObject): def traverse(self, max_depth=-1, predicate = lambda i: True): """ Returns + Iterator to traverse the tree recursively up to the given level. The iterator returns Blob and Tree objects |