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

    Fields
    Modifier and Type
    Field
    Description
    private String
     
    private boolean
     
    private boolean
     
    private File
     

    Fields 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    void
    setBranch(String branch)
    Set branch
    void
    setCreateBranch(boolean createBranch)
    Set if branch should be created if not yet existing
    void
    setForce(boolean force)
    Set force
    void
    setSrc(File src)
    Set the src

    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

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • src

      private File src
    • branch

      private String branch
    • createBranch

      private boolean createBranch
    • force

      private boolean force
  • Constructor Details

    • GitCheckoutTask

      public GitCheckoutTask()
  • Method Details

    • setSrc

      public void setSrc(File src)
      Set the src
      Parameters:
      src - the src to set
    • setBranch

      public void setBranch(String branch)
      Set branch
      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)
      Set force
      Parameters:
      force - if true 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 class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException