diff options
author | Phil Monroe <phil@philmonroe.com> | 2012-06-12 11:21:03 -0700 |
---|---|---|
committer | Phil Monroe <phil@philmonroe.com> | 2012-06-12 11:21:03 -0700 |
commit | 4fde3e50dbe011dbaf6054cac25c07b86b07d8a0 (patch) | |
tree | 633945de2f2cf0af64be5e14245aab621cb244a3 /lib | |
parent | d748a83e18b2a0c0cd307911b3a3c7020302596a (diff) | |
download | bundler-4fde3e50dbe011dbaf6054cac25c07b86b07d8a0.tar.gz |
Allowing git local override to to accept :branch, :tag or :ref
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/source.rb | 9 |
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) |