aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/source.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-03-19 10:36:13 +0100
committerlolwut <lol@wut.com>2012-03-19 19:02:30 +0100
commitd376a1a7d738f57fd3bd6091f1b72e6e7aca3727 (patch)
treef5ea9a0c9aeeb6fb7344d7cd2bc58929c35da68d /lib/bundler/source.rb
parent7ea338f06332cb397e3d4ead548463e39c863932 (diff)
downloadbundler-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.rb8
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