summaryrefslogtreecommitdiff
path: root/lib/bundler/source/git.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-07-21 21:01:58 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-08-16 15:03:38 +0900
commit2e04336b6718b4ad59f9563b388d34cde24704ed (patch)
tree6058e81b75fa6f6b8c2b85e0270013ab4f0532ae /lib/bundler/source/git.rb
parent4a3777bf6ba78473ace61fbaa663faaa4e7068e3 (diff)
[rubygems/rubygems] Fix git source conservativeness
https://github.com/rubygems/rubygems/commit/9a0e0dfd5b
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r--lib/bundler/source/git.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 4a9f3731bd..adbce5fce4 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -67,6 +67,13 @@ module Bundler
alias_method :==, :eql?
+ def include?(other)
+ other.is_a?(Git) && uri == other.uri &&
+ name == other.name &&
+ glob == other.glob &&
+ submodules == other.submodules
+ end
+
def to_s
begin
at = humanized_ref || current_branch