Skip to content

Instantly share code, notes, and snippets.

@caryp
Created August 17, 2009 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caryp/169397 to your computer and use it in GitHub Desktop.
Save caryp/169397 to your computer and use it in GitHub Desktop.
diff --git a/agents/lib/instance/executable_sequence.rb b/agents/lib/instance/executable_sequence.rb
index bc511b0..ebb88bd 100644
--- a/agents/lib/instance/executable_sequence.rb
+++ b/agents/lib/instance/executable_sequence.rb
@@ -152,7 +152,7 @@ module RightScale
when :git
ssh_cmd = ssh_command(repo)
"#{ssh_cmd} git clone --quiet --depth 1 #{repo.url} #{cookbook_dir} 2>&1" +
- (repo.tag ? " && cd #{cookbook_dir} && #{ssh_cmd} git pull 2>&1 && git checkout #{repo.tag} 2>&1 && cd -" : '')
+ (repo.tag ? " && cd #{cookbook_dir} && #{ssh_cmd} git pull 2>&1 && git checkout -b #{repo.tag} origin/#{repo.tag} 2>&1 && cd -" : '')
when :svn
"svn export #{repo.url} #{cookbook_dir} --non-interactive" +
(repo.tag ? " --revision #{repo.tag}" : '') +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment