Stop git zombie creation during force push check

This commit is contained in:
Jacob Vosmaer 2015-01-22 15:51:20 +01:00
parent 2b10520b30
commit f937e05949
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ v 7.8.0
-
-
-
-
- Stop git zombie creation during force push check
-
-
-

View file

@ -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