module Git::Base::Factory
def branch(branch_name = 'master')
def branch(branch_name = 'master') Git::Branch.new(self, branch_name) end
def branches
returns a Git::Branches object of all the Git::Branch
def branches Git::Branches.new(self) end
def commit_tree(tree = nil, opts = {})
def commit_tree(tree = nil, opts = {}) Git::Object::Commit.new(self, self.lib.commit_tree(tree, opts)) end
def diff(objectish = 'HEAD', obj2 = nil)
def diff(objectish = 'HEAD', obj2 = nil) Git::Diff.new(self, objectish, obj2) end
def gblob(objectish)
def gblob(objectish) Git::Object.new(self, objectish, 'blob') end
def gcommit(objectish)
def gcommit(objectish) Git::Object.new(self, objectish, 'commit') end
def gtree(objectish)
def gtree(objectish) Git::Object.new(self, objectish, 'tree') end
def log(count = 30)
def log(count = 30) Git::Log.new(self, count) end
def object(objectish)
on the objectish and determine the type of the object and return
@git.object calls a factory method that will run a rev-parse
still return a Git::Object::Commit object.
just for readability. If you call @git.gtree('HEAD') it will
you can also call @git.gtree('tree'), but that's
returns a Git::Object of the appropriate type
def object(objectish) Git::Object.new(self, objectish) end
def remote(remote_name = 'origin')
def remote(remote_name = 'origin') Git::Remote.new(self, remote_name) end
def status
def status Git::Status.new(self) end
def tag(tag_name)
def tag(tag_name) Git::Object.new(self, tag_name, 'tag', true) end