diff options
author | Samuel Giddins <[email protected]> | 2024-12-04 15:49:01 -0800 |
---|---|---|
committer | git <[email protected]> | 2024-12-05 19:00:44 +0000 |
commit | 305318edbb0a5ddeb1f282a50d7ab39bb6706167 (patch) | |
tree | 7eec60038ed31465eb9aa771ff91b10565249c61 | |
parent | 7daf85bdf250a1056e7441ee88b588cf69d00556 (diff) |
[rubygems/rubygems] Apply suggestions from code review
https://github.com/rubygems/rubygems/commit/7c634ecd72
-rw-r--r-- | lib/rubygems/source/git.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rubygems/source/git.rb b/lib/rubygems/source/git.rb index 709b269529..baf2f9dd4c 100644 --- a/lib/rubygems/source/git.rb +++ b/lib/rubygems/source/git.rb @@ -93,18 +93,18 @@ class Gem::Source::Git < Gem::Source return false unless File.exist? repo_cache_dir unless File.exist? install_dir - system git, "clone", "--quiet", "--no-checkout", + system git_command, "clone", "--quiet", "--no-checkout", repo_cache_dir, install_dir end Dir.chdir install_dir do - system git, "fetch", "--quiet", "--force", "--tags", install_dir + system git_command, "fetch", "--quiet", "--force", "--tags", install_dir - success = system git, "reset", "--quiet", "--hard", rev_parse + success = system git_command, "reset", "--quiet", "--hard", rev_parse if @need_submodules require "open3" - _, status = Open3.capture2e(git, "submodule", "update", "--quiet", "--init", "--recursive") + _, status = Open3.capture2e(git_command, "submodule", "update", "--quiet", "--init", "--recursive") success &&= status.success? end @@ -121,11 +121,11 @@ class Gem::Source::Git < Gem::Source if File.exist? repo_cache_dir Dir.chdir repo_cache_dir do - system git, "fetch", "--quiet", "--force", "--tags", + system git_command, "fetch", "--quiet", "--force", "--tags", @repository, "refs/heads/*:refs/heads/*" end else - system git, "clone", "--quiet", "--bare", "--no-hardlinks", + system git_command, "clone", "--quiet", "--bare", "--no-hardlinks", @repository, repo_cache_dir end end |