22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/git_cli/pull.rb', line 22
def pull(repos, branch = "master")
check_vcs
raise_if_empty(repos, "Pull from repository name cannot be empty", GitCliException)
raise_if_false(is_repos_exist?(repos), "Given repository name '#{repos}' is not configured for this workspace", GitCliException)
cmd = []
cmd << "cd"
cmd << @wsPath
cmd << "&&"
cmd << @vcs.exe_path
cmd << "pull"
cmd << repos
cmd << branch
cmdln = cmd.join " "
log_debug "Pull : #{cmdln}"
os_exec(cmdln) do |st, res|
[st.success?, res.strip]
end
end
|