Skip to content

Commit cd92323

Browse files
Merge branch 'master' of git://github.com/mikemallete/ruby-git into pull-fix
2 parents 121866c + a147c77 commit cd92323

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

lib/git/base.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,8 @@ def each_conflict(&block) # :yields: file, your_version, their_version
332332
end
333333

334334
# fetches a branch from a remote and merges it into the current working branch
335-
def pull(remote = 'origin', branch = 'master', message = 'origin pull')
336-
fetch(remote)
337-
merge(branch, message)
335+
def pull(remote = 'origin', branch = 'master')
336+
self.lib.pull(remote, branch)
338337
end
339338

340339
# returns an array of Git:Remote objects

lib/git/lib.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,11 @@ def push(remote, branch = 'master', tags = false)
543543
command('push', [remote, branch])
544544
command('push', ['--tags', remote]) if tags
545545
end
546-
546+
547+
def pull(remote = 'origin', branch = 'master')
548+
command('pull', [remote, branch])
549+
end
550+
547551
def tag_sha(tag_name)
548552
head = File.join(@git_dir, 'refs', 'tags', tag_name)
549553
return File.read(head).chomp if File.exists?(head)

lib/git/path.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ def to_s
2424
@path
2525
end
2626

27-
end
27+
end
2828

2929
end

0 commit comments

Comments
 (0)