Skip to content

Commit de8e04d

Browse files
author
Brad Heller
committed
Use gits pull function instead of the idiom.
1 parent 94f389b commit de8e04d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/git/base.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module Git
2-
32
class Base
43

54
# opens a bare Git Repository - no working directory options
@@ -321,8 +320,9 @@ def each_conflict(&block) # :yields: file, your_version, their_version
321320

322321
# fetches a branch from a remote and merges it into the current working branch
323322
def pull(remote = 'origin', branch = 'master', message = 'origin pull')
324-
fetch(remote)
325-
merge(branch, message)
323+
#fetch(remote)
324+
#merge(branch, message)
325+
self.lib.pull(remote, branch)
326326
end
327327

328328
# returns an array of Git:Remote objects

lib/git/lib.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,10 @@ def tag(tag)
557557
def fetch(remote)
558558
command('fetch', remote)
559559
end
560+
561+
def pull(remote, branch)
562+
command('pull', [remote, branch])
563+
end
560564

561565
def push(remote, branch = 'master', tags = false)
562566
command('push', [remote, branch])

0 commit comments

Comments
 (0)