diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-22 09:20:42 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-22 09:20:42 -0800 |
commit | 635f62be67a0a0e7cb02df40317e1c58c78738fb (patch) | |
tree | d204ea099c82dc19624324da51c94dce680df40d | |
parent | b73170f5c15401e5b43ec18584c8036bf973ca0b (diff) | |
parent | a63187f28b18e2feea16681b313166a982254e4e (diff) | |
download | gitlab-ce-635f62be67a0a0e7cb02df40317e1c58c78738fb.tar.gz |
Merge branch 'stop_popen_zombies'
Conflicts:
CHANGELOG
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | doc/development/shell_commands.md | 2 | ||||
-rw-r--r-- | lib/gitlab/force_push_check.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG index 0a28e31ce91..79b2f094554 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,7 +21,7 @@ v 7.8.0 - - - Upgrade Sidekiq gem to version 3.3.0 - - + - Stop git zombie creation during force push check - - - Fix commits pagination @@ -1107,4 +1107,4 @@ v 0.8.0 - stability - security fixes - increased test coverage - - email notification
\ No newline at end of file + - email notification diff --git a/doc/development/shell_commands.md b/doc/development/shell_commands.md index 1e51ad73e32..42f17e19536 100644 --- a/doc/development/shell_commands.md +++ b/doc/development/shell_commands.md @@ -108,7 +108,7 @@ In other repositories, such as gitlab-shell you can also use `IO.popen`. ```ruby # Safe IO.popen example -logs = IO.popen(%W(git log), chdir: repo_dir).read +logs = IO.popen(%W(git log), chdir: repo_dir) { |p| p.read } ``` Note that unlike `Gitlab::Popen.popen`, `IO.popen` does not capture standard error. diff --git a/lib/gitlab/force_push_check.rb b/lib/gitlab/force_push_check.rb index 6a52cdba608..6ba2c3ad00a 100644 --- a/lib/gitlab/force_push_check.rb +++ b/lib/gitlab/force_push_check.rb @@ -4,7 +4,7 @@ module Gitlab return false if project.empty_repo? if oldrev != Gitlab::Git::BLANK_SHA && newrev != Gitlab::Git::BLANK_SHA - missed_refs = IO.popen(%W(git --git-dir=#{project.repository.path_to_repo} rev-list #{oldrev} ^#{newrev})).read + missed_refs, _ = Gitlab::Popen.popen(%W(git --git-dir=#{project.repository.path_to_repo} rev-list #{oldrev} ^#{newrev})) missed_refs.split("\n").size > 0 else false |