diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-10 00:25:24 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-10 00:25:24 +0300 |
commit | 1731934398aedfec89ad006818b55641dc1f789c (patch) | |
tree | 46a552cf01c7b0b7deb85a31c48369e443649f16 /lib/gitlab/git/repository.rb | |
parent | d6170ce4d8a0cbfd8552531c29163e44549222cf (diff) |
Add `Gitlab::Git::Repository#fetch` command
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-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 0f059bef808..c49065c38bc 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -1082,6 +1082,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 |