Skip to content

Commit

Permalink
Fix the logic that detects if the local clone of a git repository is …
Browse files Browse the repository at this point in the history
…up to date.
  • Loading branch information
Carl Lerche committed Aug 29, 2010
1 parent ff93641 commit 108f5d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def checkout

def has_revision_cached?
return unless @revision
in_cache { git %|rev-parse --verify --quiet #{@revision}| }
in_cache { git %|cat-file -e #{@revision}| }
true
rescue GitError
false
Expand Down
2 changes: 1 addition & 1 deletion spec/install/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@

lockfile = File.read(bundled_app("Gemfile.lock"))
File.open(bundled_app("Gemfile.lock"), "w") do |file|
file.puts lockfile.gsub(/revision: #{old_revision[0..6]}/, "revision: #{new_revision[0..6]}")
file.puts lockfile.gsub(/revision: #{old_revision}/, "revision: #{new_revision}")
end

bundle "install"
Expand Down

0 comments on commit 108f5d7

Please sign in to comment.