Skip to content

Commit 486485a

Browse files
deivid-rodriguezmatzbot
authored andcommitted
[rubygems/rubygems] Refactor
ruby/rubygems@9964c16bb9
1 parent 0a7099a commit 486485a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/bundler/definition.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,6 @@ def converge_specs(specs)
951951
gemfile_source = dep.source || default_source
952952

953953
deps << dep if !dep.source || lockfile_source.include?(dep.source)
954-
@gems_to_unlock << name if lockfile_source.include?(dep.source) && lockfile_source != gemfile_source
955954

956955
# Replace the locked dependency's source with the equivalent source from the Gemfile
957956
s.source = gemfile_source
@@ -964,7 +963,7 @@ def converge_specs(specs)
964963
next if @sources_to_unlock.include?(source.name)
965964

966965
# Path sources have special logic
967-
if source.instance_of?(Source::Path) || source.instance_of?(Source::Gemspec)
966+
if source.instance_of?(Source::Path) || source.instance_of?(Source::Gemspec) || (source.instance_of?(Source::Git) && !@gems_to_unlock.include?(name) && deps.include?(dep))
968967
new_spec = source.specs[s].first
969968
if new_spec
970969
s.dependencies.replace(new_spec.dependencies)

0 commit comments

Comments
 (0)