summaryrefslogtreecommitdiffstats
path: root/lib/git/object.rb
diff options
context:
space:
mode:
authorScott Chacon <schacon@gmail.com>2008-03-08 18:33:34 -0800
committerScott Chacon <schacon@gmail.com>2008-03-08 18:33:34 -0800
commit476d943baabc9852f1653088a58bdb2912bbd95a (patch)
tree8539fe944c25c5b52ad8fd46dce10cc35b6ae86f /lib/git/object.rb
parent099f60dd07aeefd31c94eae532db97e811562fb7 (diff)
downloadthird_party-ruby-git-476d943baabc9852f1653088a58bdb2912bbd95a.tar.gz
third_party-ruby-git-476d943baabc9852f1653088a58bdb2912bbd95a.tar.xz
third_party-ruby-git-476d943baabc9852f1653088a58bdb2912bbd95a.zip
added tree.depth and tree.full_tree
Diffstat (limited to 'lib/git/object.rb')
-rw-r--r--lib/git/object.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/git/object.rb b/lib/git/object.rb
index 04102bc..e35060c 100644
--- a/lib/git/object.rb
+++ b/lib/git/object.rb
@@ -124,6 +124,14 @@ module Git
alias_method :subtrees, :trees
alias_method :subdirectories, :trees
+ def full_tree
+ @base.lib.full_tree(@objectish)
+ end
+
+ def depth
+ @base.lib.tree_depth(@objectish)
+ end
+
private
def setup