diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-10-12 17:53:32 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-10-12 17:53:32 +0300 |
commit | 400557f0baa789aef52462f954c6f0be77fc99fc (patch) | |
tree | 1f32a52f5f23a330b4fd2e97c77376ba5dff270b /lib/gitlab | |
parent | ca06ff27874d96705b7878a17179ffb25d809aba (diff) | |
parent | 1731934398aedfec89ad006818b55641dc1f789c (diff) |
Merge branch 'gitaly-fetch-remote' into 'master'
Add `Gitlab::Git::Repository#fetch` command
Closes gitaly#586
See merge request gitlab-org/gitlab-ce!14772
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/git/repository.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index a082cfed706..5b9c42ef586 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -1086,6 +1086,12 @@ module Gitlab @has_visible_content = has_local_branches? end + def fetch(remote = 'origin') + args = %W(#{Gitlab.config.git.bin_path} fetch #{remote}) + + popen(args, @path).last.zero? + end + def gitaly_repository Gitlab::GitalyClient::Util.repository(@storage, @relative_path, @gl_repository) end |