Package org.eclipse.jgit.ant.tasks
Class GitCheckoutTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.eclipse.jgit.ant.tasks.GitCheckoutTask
-
- All Implemented Interfaces:
Cloneable
public class GitCheckoutTask extends org.apache.tools.ant.Task
Checkout a branch or paths to the working tree.- See Also:
- git-checkout(1)
-
-
Constructor Summary
Constructors Constructor Description GitCheckoutTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
void
setBranch(String branch)
Setbranch
void
setCreateBranch(boolean createBranch)
Set if branch should be created if not yet existingvoid
setForce(boolean force)
Setforce
void
setSrc(File src)
Set thesrc
-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Method Detail
-
setSrc
public void setSrc(File src)
Set thesrc
- Parameters:
src
- the src to set
-
setBranch
public void setBranch(String branch)
Setbranch
- Parameters:
branch
- the initial branch to check out
-
setCreateBranch
public void setCreateBranch(boolean createBranch)
Set if branch should be created if not yet existing- Parameters:
createBranch
- whether the branch should be created if it does not already exist
-
setForce
public void setForce(boolean force)
Setforce
- Parameters:
force
- iftrue
and the branch with the given name already exists, the start-point of an existing branch will be set to a new start-point; if false, the existing branch will not be changed
-
execute
public void execute() throws org.apache.tools.ant.BuildException
- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
-
-