summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/source.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index f5d55a0d79..1609db65a3 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -716,9 +716,9 @@ module Bundler
path = Pathname.new(path)
path = path.expand_path(Bundler.root) unless path.relative?
- unless options["branch"]
+ unless options["branch"] || options["tag"] || options["ref"]
raise GitError, "Cannot use local override for #{name} at #{path} because " \
- ":branch is not specified in Gemfile. Specify a branch or check " \
+ ":branch, :tag, or :ref is not specified in Gemfile. Specify a commit reference or check " \
"`bundle config --delete` to remove the local override"
end
@@ -733,11 +733,6 @@ module Bundler
# so the Gemfile.lock always picks up the new revision.
@git_proxy = GitProxy.new(path, uri, ref)
- if git_proxy.branch != options["branch"]
- raise GitError, "Local override for #{name} at #{path} is using branch " \
- "#{git_proxy.branch} but Gemfile specifies #{options["branch"]}"
- end
-
changed = cached_revision && cached_revision != git_proxy.revision
if changed && !git_proxy.contains?(cached_revision)