From 21f89ff5a7c05dc53753f54e963d04f4986af454 Mon Sep 17 00:00:00 2001 From: Steve Craig Date: Fri, 22 Jan 2016 13:25:10 -0800 Subject: [PATCH 1/2] unset GIT_WORK_TREE before clone --- lib/github_heroku_deployer/git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github_heroku_deployer/git.rb b/lib/github_heroku_deployer/git.rb index 4894e88..4d62b80 100644 --- a/lib/github_heroku_deployer/git.rb +++ b/lib/github_heroku_deployer/git.rb @@ -53,7 +53,7 @@ def exists_locally? def clone wrapper = ssh_wrapper @logger.info "cloning #{@github_repo} to #{folder}" - run "env #{wrapper.git_ssh} git clone #{@github_repo} #{folder}" + run "unset GIT_WORK_TREE; env #{wrapper.git_ssh} git clone #{@github_repo} #{folder}" ensure wrapper.unlink end From 2be4e5c53257827158c32b53cbf0ba1b32a9d946 Mon Sep 17 00:00:00 2001 From: Steve Craig Date: Fri, 22 Jan 2016 14:27:55 -0800 Subject: [PATCH 2/2] add logger to git.rb --- lib/github_heroku_deployer/git.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/github_heroku_deployer/git.rb b/lib/github_heroku_deployer/git.rb index 4d62b80..61be9c3 100644 --- a/lib/github_heroku_deployer/git.rb +++ b/lib/github_heroku_deployer/git.rb @@ -53,6 +53,7 @@ def exists_locally? def clone wrapper = ssh_wrapper @logger.info "cloning #{@github_repo} to #{folder}" + @logger.info "unsetting GIT_WORK_TREE" run "unset GIT_WORK_TREE; env #{wrapper.git_ssh} git clone #{@github_repo} #{folder}" ensure wrapper.unlink