Skip to content

Commit 0e0884f

Browse files
authored
Added allow_unrelated_histories option support for pull
1 parent 98270b6 commit 0e0884f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/git/lib.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,12 @@ def push(remote, branch = 'master', opts = {})
888888
end
889889
end
890890

891-
def pull(remote='origin', branch='master')
892-
command('pull', remote, branch)
891+
def pull(remote='origin', branch='master', opts = {})
892+
893+
arr_opts = []
894+
arr_opts << '--allow-unrelated-histories' if opts[:allow_unrelated_histories]
895+
896+
command('pull', remote, branch, arr_opts)
893897
end
894898

895899
def tag_sha(tag_name)

0 commit comments

Comments
 (0)