Skip to content

Commit 305318e

Browse files
segiddinsmatzbot
authored andcommitted
[rubygems/rubygems] Apply suggestions from code review
ruby/rubygems@7c634ecd72
1 parent 7daf85b commit 305318e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/rubygems/source/git.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@ def checkout # :nodoc:
9393
return false unless File.exist? repo_cache_dir
9494

9595
unless File.exist? install_dir
96-
system git, "clone", "--quiet", "--no-checkout",
96+
system git_command, "clone", "--quiet", "--no-checkout",
9797
repo_cache_dir, install_dir
9898
end
9999

100100
Dir.chdir install_dir do
101-
system git, "fetch", "--quiet", "--force", "--tags", install_dir
101+
system git_command, "fetch", "--quiet", "--force", "--tags", install_dir
102102

103-
success = system git, "reset", "--quiet", "--hard", rev_parse
103+
success = system git_command, "reset", "--quiet", "--hard", rev_parse
104104

105105
if @need_submodules
106106
require "open3"
107-
_, status = Open3.capture2e(git, "submodule", "update", "--quiet", "--init", "--recursive")
107+
_, status = Open3.capture2e(git_command, "submodule", "update", "--quiet", "--init", "--recursive")
108108

109109
success &&= status.success?
110110
end
@@ -121,11 +121,11 @@ def cache # :nodoc:
121121

122122
if File.exist? repo_cache_dir
123123
Dir.chdir repo_cache_dir do
124-
system git, "fetch", "--quiet", "--force", "--tags",
124+
system git_command, "fetch", "--quiet", "--force", "--tags",
125125
@repository, "refs/heads/*:refs/heads/*"
126126
end
127127
else
128-
system git, "clone", "--quiet", "--bare", "--no-hardlinks",
128+
system git_command, "clone", "--quiet", "--bare", "--no-hardlinks",
129129
@repository, repo_cache_dir
130130
end
131131
end

0 commit comments

Comments
 (0)