diff options
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/object.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/git/object.rb b/lib/git/object.rb index 4372463..33c3e38 100644 --- a/lib/git/object.rb +++ b/lib/git/object.rb @@ -53,6 +53,22 @@ module Git @base.lib.archive(@sha, file, opts) end + def tree? + @type == 'tree' + end + + def blob? + @type == 'blob' + end + + def commit? + @type == 'commit' + end + + def tag? + @type == 'tag' + end + end |