Class | Git::Object::AbstractObject |
In: |
lib/git/object.rb
|
Parent: | Object |
mode | [RW] | |
objectish | [RW] | |
size | [RW] | |
type | [RW] |
# File lib/git/object.rb, line 17 def initialize(base, objectish) @base = base @objectish = objectish.to_s setup end
creates an archive of this object (tree)
# File lib/git/object.rb, line 63 def archive(file = nil, opts = {}) @base.lib.archive(@objectish, file, opts) end
caches the contents of this call in memory
# File lib/git/object.rb, line 32 def contents @contents || @contents = @base.lib.object_contents(@objectish) end
# File lib/git/object.rb, line 54 def diff(objectish) Git::Diff.new(@base, @objectish, objectish) end
# File lib/git/object.rb, line 48 def grep(string, path_limiter = nil, opts = {}) default = {:object => sha, :path_limiter => path_limiter} grep_options = default.merge(opts) @base.lib.grep(string, grep_options) end
# File lib/git/object.rb, line 58 def log(count = 30) Git::Log.new(@base, count).object(@objectish) end