lib/vlad/git.rb
##
# Returns the command that will check out +revision+ from the
# repository into directory +destination+.  +revision+ can be any
# SHA1 or equivalent (e.g. branch, tag, etc...)
Returns the command that will check out +revision+ from the
repository into directory +destination+.  +revision+ can be any
SHA1 or equivalent
Returns the command that will check out + revision + from the repository into directory + destination + . + revision + can be any SHA1 or equivalent
def checkout(revision, destination)
    destination = 'repo' if destination == '.'
    revision = 'HEAD' if revision =~ /head/i
    [ "rm -rf #{destination}",
      ". ~/.bash_profile",
      "#{git_cmd} clone #{repository} #{destination}",
      "cd #{destination}",
      "#{git_cmd} checkout -f -b deployed-#{revision} #{revision}"
    ].join(" && ")
  end
def checkout ( revision , destination ) destination = 'repo' if destination == '.' revision = 'HEAD' if revision =~ / head /i [ "rm -rf #{destination}" , ". ~/.bash_profile" , "#{git_cmd} clone #{repository} #{destination}" , "cd #{destination}" , "#{git_cmd} checkout -f -b deployed-#{revision} #{revision}" ] . join ( " && " ) end
Returns the command that will check out +revision+ from the
repository into directory +destination+.
Returns the command that will check out + revision + from the repository into directory + destination + .
revision
<not_specific>
destination
<not_specific>