diff options
author | Luke Duncalfe <lduncalfe@eml.cc> | 2019-03-11 01:34:24 +0300 |
---|---|---|
committer | Luke Duncalfe <lduncalfe@eml.cc> | 2019-03-11 01:34:24 +0300 |
commit | 85b866a1aed49d06cf242e68366e81a7e58e55a3 (patch) | |
tree | 210c098f4ff0f30115a24599b502497df629ccfd | |
parent | 4658f6c87af1d4cf2180414e4336dd4f958205e6 (diff) |
Change popen3 to popen2 because stderr is ignoreduse-popen2
-rw-r--r-- | ruby/lib/gitlab/git/repository.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ruby/lib/gitlab/git/repository.rb b/ruby/lib/gitlab/git/repository.rb index 1a0b7d044..e7619ad03 100644 --- a/ruby/lib/gitlab/git/repository.rb +++ b/ruby/lib/gitlab/git/repository.rb @@ -270,8 +270,8 @@ module Gitlab result = [] - Open3.popen3(*git_diff_cmd(old_rev, new_rev)) do |_stdin, stdout, _stderr, wait_thr| - cat_stdin, cat_stdout, cat_stderr, cat_wait_thr = Open3.popen3(*git_cat_file_cmd) + Open3.popen2(*git_diff_cmd(old_rev, new_rev)) do |_stdin, stdout, wait_thr| + cat_stdin, cat_stdout, cat_wait_thr = Open3.popen2(*git_cat_file_cmd) stdout.each_line do |line| old_mode, new_mode, blob_id, rest = parse_raw_diff_line(line) @@ -281,7 +281,6 @@ module Gitlab cat_stdin.close cat_stdout.close - cat_stderr.close raise ::Gitlab::Git::Repository::GitError, "Unabled to obtain changes between #{old_rev} and #{new_rev}" unless [cat_wait_thr, wait_thr].all? { |waiter| waiter.value&.success? } end |