diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2012-03-19 10:36:13 +0100 |
---|---|---|
committer | lolwut <lol@wut.com> | 2012-03-19 19:02:30 +0100 |
commit | d376a1a7d738f57fd3bd6091f1b72e6e7aca3727 (patch) | |
tree | f5ea9a0c9aeeb6fb7344d7cd2bc58929c35da68d /lib/bundler/source.rb | |
parent | 7ea338f06332cb397e3d4ead548463e39c863932 (diff) | |
download | bundler-d376a1a7d738f57fd3bd6091f1b72e6e7aca3727.tar.gz |
Do not resolve if the local override did not change.
Diffstat (limited to 'lib/bundler/source.rb')
-rw-r--r-- | lib/bundler/source.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index 23676dec..195c7dc5 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -714,13 +714,15 @@ module Bundler "#{git_proxy.branch} but Gemfile specifies #{options["branch"]}" end - rev = cached_revision + changed = cached_revision && cached_revision != git_proxy.revision - if rev && rev != git_proxy.revision && !git_proxy.contains?(rev) - raise GitError, "The Gemfile lock is pointing to revision #{shortref_for_display(rev)} " \ + if changed && !git_proxy.contains?(cached_revision) + raise GitError, "The Gemfile lock is pointing to revision #{shortref_for_display(cached_revision)} " \ "but the current branch in your local override for #{name} does not contain such commit. " \ "Please make sure your branch is up to date." end + + changed end # TODO: actually cache git specs |