Module: Capistrano::Git::DefaultStrategy

### Home Classes Methods

### In Files

- lib/capistrano/git.rb

### Methods

- #check
- #clone
- #fetch_revision
- #release
- #test
- #update

### Files

- Capfile
- Capfile

### Class/Module Index

Quicksearch

- Capistrano
- Capistrano::Application
- Capistrano::Configuration
- Capistrano::Configuration::Filter
- Capistrano::Configuration::Question
- Capistrano::Configuration::Server
- Capistrano::Configuration::Server::Properties
- Capistrano::Configuration::Servers
- Capistrano::DSL
- Capistrano::DSL::Env
- Capistrano::DSL::Paths
- Capistrano::DSL::Stages
- Capistrano::Git
- Capistrano::Git::DefaultStrategy
- Capistrano::Hg
- Capistrano::Hg::DefaultStrategy
- Capistrano::SCM
- Capistrano::Svn
- Capistrano::Svn::DefaultStrategy
- Capistrano::TaskEnhancements
- Capistrano::UploadTask
- Capistrano::VersionValidator
- Object

No matching classes.

# Capistrano::Git::DefaultStrategy

The Capistrano default strategy for git. You should want to use this.

### Public Instance Methods

check() click to toggle source

    # File lib/capistrano/git.rb, line 20
    def check
      git :'ls-remote --heads', repo_url
    end

clone() click to toggle source

    # File lib/capistrano/git.rb, line 24
    def clone
      git :clone, '--mirror', repo_url, repo_path
    end

fetch_revision() click to toggle source

    # File lib/capistrano/git.rb, line 42
    def fetch_revision
      context.capture(:git, "rev-list --max-count=1 --abbrev-commit #{fetch(:branch)}")
    end

release() click to toggle source

    # File lib/capistrano/git.rb, line 32
    def release
      if tree = fetch(:repo_tree)
        tree = tree.slice %^/?(.*?)/?$#, 1
        components = tree.split('/').size
        git :archive, fetch(:branch), tree, "| tar -x --strip-components #{components} -f - -C", release_path
      else
        git :archive, fetch(:branch), '| tar -x -f - -C', release_path
      end
    end

test() click to toggle source

    # File lib/capistrano/git.rb, line 16
    def test
      test! " [ -f #{repo_path}/HEAD ] "
    end

update() click to toggle source

    # File lib/capistrano/git.rb, line 28
    def update
      git :remote, :update
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.