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:
-
Field Summary
FieldsFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
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
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
src
-
branch
-
createBranch
private boolean createBranch -
force
private boolean force
-
-
Constructor Details
-
GitCheckoutTask
public GitCheckoutTask()
-
-
Method Details
-
setSrc
Set thesrc
- Parameters:
src
- the src to set
-
setBranch
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
-