diff options
author | Pedro Belo <pedro@heroku.com> | 2010-02-10 16:31:13 -0800 |
---|---|---|
committer | Pedro Belo <pedro@heroku.com> | 2010-02-10 16:31:13 -0800 |
commit | 3007c212a568c084e5fe2b4254693f8fa8b97568 (patch) | |
tree | 8ed3e340f8d923ab144b1104590468231a9061cc | |
parent | f7bfddea609fcd568e0082809af3214457553630 (diff) | |
download | bundler-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.rb | 7 |
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 |