lib/git/base.rb in git-2.1.1 vs lib/git/base.rb in git-2.2.0
- old
+ new
@@ -632,19 +632,22 @@
end
# runs git rev-parse to convert the objectish to a full sha
#
# @example
- # git.revparse("HEAD^^")
- # git.revparse('v2.4^{tree}')
- # git.revparse('v2.4:/doc/index.html')
+ # git.rev_parse("HEAD^^")
+ # git.rev_parse('v2.4^{tree}')
+ # git.rev_parse('v2.4:/doc/index.html')
#
- def revparse(objectish)
- self.lib.revparse(objectish)
+ def rev_parse(objectish)
+ self.lib.rev_parse(objectish)
end
- def ls_tree(objectish)
- self.lib.ls_tree(objectish)
+ # For backwards compatibility
+ alias revparse rev_parse
+
+ def ls_tree(objectish, opts = {})
+ self.lib.ls_tree(objectish, opts)
end
def cat_file(objectish)
self.lib.object_contents(objectish)
end