From de8e04d4e37a54136d4c74d1eb07642cb4849bba Mon Sep 17 00:00:00 2001 From: Brad Heller Date: Sun, 8 May 2011 10:13:19 -0700 Subject: [PATCH] Use gits pull function instead of the idiom. --- lib/git/base.rb | 6 +++--- lib/git/lib.rb | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) 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])