ruby/lib/bundler/source
David Rodríguez c1fb25f6fc
[rubygems/rubygems] Don't run any git commands when sorting and comparing git sources
Previously, when sorting and comparing git Gemfile vs lockfile sources during
`bundler/setup` to figure out whether we need to re-resolve or not, we
would try to find the default branch if nothing more specific was
specified in the Gemfile.

If the git cache has been deleted thought, that would fail.

The error would still be swallowed (and the branch would simply not be
displayed), but trying to clone would still generate the side effect of
creating the parent folder for the clone.

That could affect non-writable systems that don't expect `bundler/setup`
to write to the filesystem at all.

To fix this, override `Bundler::Source::Git#identifier` to use
exclusively static information, so it does not even try to clone the
repo nor generate any side effects.

582eb2ef39
2023-07-13 11:36:03 +09:00
..
git [rubygems/rubygems] Fix git source lockfile unstability 2023-07-04 14:54:26 +09:00
path Merge 16c3535413 2022-09-05 14:37:12 +09:00
rubygems Merge bundler-2.2.0.rc.2 2020-10-15 17:19:02 +09:00
gemspec.rb
git.rb [rubygems/rubygems] Don't run any git commands when sorting and comparing git sources 2023-07-13 11:36:03 +09:00
metadata.rb Merge rubygems/rubygems HEAD 2023-06-20 13:35:13 +09:00
path.rb Merge RubyGems and Bundler master 2023-01-10 15:53:07 +09:00
rubygems.rb [rubygems/rubygems] When printing frozen errors, print only Gemfile information 2023-07-04 14:54:25 +09:00
rubygems_aggregate.rb [rubygems/rubygems] Improve sources representation 2021-12-03 20:00:50 +09:00