Class 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)
    • Field Summary

      • 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
      GitCheckoutTask()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      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
    • Constructor Detail

      • GitCheckoutTask

        public GitCheckoutTask()
    • Method Detail

      • 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