diff options
author | André Arko <andre@arko.net> | 2012-06-12 22:02:11 -0700 |
---|---|---|
committer | André Arko <andre@arko.net> | 2012-06-12 22:02:11 -0700 |
commit | 2d4f8ddaccfe6fc460045b93b0c3e44715a94c98 (patch) | |
tree | 4b4e95eea9f95293a497d8a1965e4157b0412dc7 /lib/bundler/source.rb | |
parent | 734342914f367144e4e5400916ca224164fc09b1 (diff) | |
parent | 3366c03ebdb76186d774c7b39c199a8a0ccafede (diff) | |
download | bundler-2d4f8ddaccfe6fc460045b93b0c3e44715a94c98.tar.gz |
Merge remote-tracking branch 'rkh/optional-branch'
Conflicts:
lib/bundler/source.rb
spec/install/git_spec.rb
Diffstat (limited to 'lib/bundler/source.rb')
-rw-r--r-- | lib/bundler/source.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index c708791d..aa05afa5 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -727,6 +727,11 @@ module Bundler # so the Gemfile.lock always picks up the new revision. @git_proxy = GitProxy.new(path, uri, ref) + if options["branch"] and 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) |