Merge branch 'lib-gitlab-git-version-popen' into 'master'

Remove Gitlab::Popen dependency from lib/gitlab/git

See merge request gitlab-org/gitlab-ce!19577
This commit is contained in:
Douwe Maan 2018-06-08 10:55:48 +00:00
commit 8a7d01ebac
2 changed files with 12 additions and 1 deletions

View File

@ -62,7 +62,7 @@ module Gitlab
end
def version
Gitlab::VersionInfo.parse(Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --version)).first)
Gitlab::Git::Version.git_version
end
def check_namespace!(*objects)

11
lib/gitlab/git/version.rb Normal file
View File

@ -0,0 +1,11 @@
module Gitlab
module Git
module Version
extend Gitlab::Git::Popen
def self.git_version
Gitlab::VersionInfo.parse(popen(%W(#{Gitlab.config.git.bin_path} --version), nil).first)
end
end
end
end