summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Belo <pedro@heroku.com>2010-02-10 16:31:13 -0800
committerPedro Belo <pedro@heroku.com>2010-02-10 16:31:13 -0800
commit3007c212a568c084e5fe2b4254693f8fa8b97568 (patch)
tree8ed3e340f8d923ab144b1104590468231a9061cc
parentf7bfddea609fcd568e0082809af3214457553630 (diff)
downloadbundler-3007c212a568c084e5fe2b4254693f8fa8b97568.tar.gz
refactoring Bundler::Source::Git#checkout to be compatible with git 1.5 (no need for mkdir_p, let git create the folder)
-rw-r--r--lib/bundler/source.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 727bb5bb5c..747edf0925 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -313,11 +313,10 @@ module Bundler
end
def checkout
- FileUtils.mkdir_p(path)
+ unless File.exist?(path + "/.git")
+ %x(git clone --no-checkout #{cache_path} #{path})
+ end
Dir.chdir(path) do
- unless File.exist?(".git")
- %x(git clone --no-checkout #{cache_path} #{path})
- end
git "fetch --quiet"
git "reset --hard #{revision}"
end