Class CloneGitRepo
- java.lang.Object
-
- org.jclouds.scriptbuilder.statements.git.CloneGitRepo
-
- All Implemented Interfaces:
Statement
public class CloneGitRepo extends Object implements Statement
Clones a gitRepoAndRef into a newly created directory, creates remote-tracking branches for each branch in the cloned gitRepoAndRef (visible using git branch -r), and creates and checks out an initial branch that is forked from the cloned gitRepoAndRef's currently active branch. PWD is set to the directory being checked out.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CloneGitRepo.Builder
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.base.Optional<String>
directory
protected GitRepoAndRef
gitRepoAndRef
-
Constructor Summary
Constructors Modifier Constructor Description protected
CloneGitRepo(GitRepoAndRef gitRepoAndRef, com.google.common.base.Optional<String> directory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CloneGitRepo.Builder
builder()
boolean
equals(Object obj)
Iterable<String>
functionDependencies(OsFamily arg0)
com.google.common.base.Optional<String>
getDirectory()
The name of a new directory to clone into.GitRepoAndRef
getGitRepoAndRef()
The coordinates to checkoutint
hashCode()
String
render(OsFamily arg0)
CloneGitRepo.Builder
toBuilder()
String
toString()
-
-
-
Field Detail
-
gitRepoAndRef
protected final GitRepoAndRef gitRepoAndRef
-
directory
protected final com.google.common.base.Optional<String> directory
-
-
Constructor Detail
-
CloneGitRepo
protected CloneGitRepo(GitRepoAndRef gitRepoAndRef, com.google.common.base.Optional<String> directory)
-
-
Method Detail
-
builder
public static CloneGitRepo.Builder builder()
-
toBuilder
public CloneGitRepo.Builder toBuilder()
-
getGitRepoAndRef
public GitRepoAndRef getGitRepoAndRef()
The coordinates to checkout
-
getDirectory
public com.google.common.base.Optional<String> getDirectory()
The name of a new directory to clone into. The "humanish" part of the source gitRepoAndRef is used if no directory is explicitly given (repo for /path/to/repo.git and foo for host.xz:foo/.git).
-
functionDependencies
public Iterable<String> functionDependencies(OsFamily arg0)
- Specified by:
functionDependencies
in interfaceStatement
-
-