diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-09-13 00:52:43 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2017-09-20 14:21:54 +0300 |
commit | 34eeac6108c0ae764c7acf09a42e1151fc90d7fb (patch) | |
tree | 3dcb6771904c0ea1ec68dc794bb6c248b81124ff /lib/gitlab/git/rev_list.rb | |
parent | 36dc65d5ca34234faf8e79106ed081a28659d899 (diff) |
Use Gitlab::Git's Popen on that module's code
This allows the current Gitaly migration to depend on less code outside
of the Gitlab::Git module
Diffstat (limited to 'lib/gitlab/git/rev_list.rb')
-rw-r--r-- | lib/gitlab/git/rev_list.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/git/rev_list.rb b/lib/gitlab/git/rev_list.rb index 2b5785a1f08..e0943d3a3eb 100644 --- a/lib/gitlab/git/rev_list.rb +++ b/lib/gitlab/git/rev_list.rb @@ -3,6 +3,8 @@ module Gitlab module Git class RevList + include Gitlab::Git::Popen + attr_reader :oldrev, :newrev, :path_to_repo def initialize(path_to_repo:, newrev:, oldrev: nil) @@ -26,7 +28,7 @@ module Gitlab private def execute(args) - output, status = Gitlab::Popen.popen(args, nil, Gitlab::Git::Env.all.stringify_keys) + output, status = popen(args, nil, Gitlab::Git::Env.all.stringify_keys) unless status.zero? raise "Got a non-zero exit code while calling out `#{args.join(' ')}`." |