Commit 635f62be authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'stop_popen_zombies'

Conflicts:
	CHANGELOG
parents b73170f5 a63187f2
...@@ -21,7 +21,7 @@ v 7.8.0 ...@@ -21,7 +21,7 @@ v 7.8.0
- -
- -
- Upgrade Sidekiq gem to version 3.3.0 - Upgrade Sidekiq gem to version 3.3.0
- - Stop git zombie creation during force push check
- -
- -
- Fix commits pagination - Fix commits pagination
...@@ -1107,4 +1107,4 @@ v 0.8.0 ...@@ -1107,4 +1107,4 @@ v 0.8.0
- stability - stability
- security fixes - security fixes
- increased test coverage - increased test coverage
- email notification - email notification
\ No newline at end of file
...@@ -108,7 +108,7 @@ In other repositories, such as gitlab-shell you can also use `IO.popen`. ...@@ -108,7 +108,7 @@ In other repositories, such as gitlab-shell you can also use `IO.popen`.
```ruby ```ruby
# Safe IO.popen example # 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. Note that unlike `Gitlab::Popen.popen`, `IO.popen` does not capture standard error.
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
return false if project.empty_repo? return false if project.empty_repo?
if oldrev != Gitlab::Git::BLANK_SHA && newrev != Gitlab::Git::BLANK_SHA 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 missed_refs.split("\n").size > 0
else else
false false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment