diff --git a/lib/git/base.rb b/lib/git/base.rb index 5ad8906a..1ed1214e 100644 --- a/lib/git/base.rb +++ b/lib/git/base.rb @@ -1,5 +1,4 @@ module Git - class Base # opens a bare Git Repository - no working directory options @@ -321,8 +320,9 @@ def each_conflict(&block) # :yields: file, your_version, their_version # 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) + #fetch(remote) + #merge(branch, message) + self.lib.pull(remote, branch) end # returns an array of Git:Remote objects diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 52fb2e6c..7dd779a8 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -557,6 +557,10 @@ def tag(tag) def fetch(remote) command('fetch', remote) end + + def pull(remote, branch) + command('pull', [remote, branch]) + end def push(remote, branch = 'master', tags = false) command('push', [remote, branch])