Skip to content

Patch for https://github.com/schacon/ruby-git/issues/32 #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 16, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/git/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,8 @@ def each_conflict(&block) # :yields: file, your_version, their_version
end

# fetches a branch from a remote and merges it into the current working branch
def pull(remote = 'origin', branch = 'master', message = 'origin pull')
fetch(remote)
merge(branch, message)
def pull(remote = 'origin', branch = 'master')
self.lib.pull(remote, branch)
end

# returns an array of Git:Remote objects
Expand Down
6 changes: 5 additions & 1 deletion lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,11 @@ def push(remote, branch = 'master', tags = false)
command('push', [remote, branch])
command('push', ['--tags', remote]) if tags
end


def pull(remote = 'origin', branch = 'master')
command('pull', [remote, branch])
end

def tag_sha(tag_name)
head = File.join(@git_dir, 'refs', 'tags', tag_name)
return File.read(head).chomp if File.exists?(head)
Expand Down
2 changes: 1 addition & 1 deletion lib/git/path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def to_s
@path
end

end
end

end