Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Gem::Source::Git.new
new(name, repository, reference, submodules = false)
lib/rubygems/source/git.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/rubygems/source/git.rb, line 51
def initialize(name, repository, reference, submodules = false)
require_relative "../uri"
@uri = Gem::Uri.parse(repository)
@name = name
@repository = repository
@reference = reference || "HEAD"
@need_submodules = submodules
@remote = true
@root_dir = Gem.dir
end
Creates a new git gem source for a gems from loaded from repository at the given reference. The name is only used to track the repository back to a gem dependencies file, it has no real significance as a git repository may contain multiple gems. If submodules is true, submodules will be checked out when the gem is installed.