public interface IGitCheckout {

  /**
   * Checks out either an existing branch or new branch from the repository.
   * 
   * @param repositoryPath
   *          Path to the root of the repository
   * @param options
   *          <code>GitCheckoutOptions</code> object used for passing options to
   *          &lt;git-checkout&gt;
   * @param branch
   *          Name of the base branch that need to be checked out or if the new branch is being
   *          checkout based on this base branch.
   * @param paths
   *          <code>List</code> of files that are specifically to be checked out.
   * @return GitCheckoutResponse object
   * @throws JavaGitException thrown if -
   *           <ul>
   *           <li>if options passed are not correct.</li>
   *           <li>if the output for &lt;git-checkout&gt; command generated an error.</li>
   *           <li>if processBuilder not able to run the command.</li>
   *           </ul>
   * @throws IOException thrown if -
   *           <ul>
   *           <li>paths given do not have proper permissions.</li>
   *           <li>paths given do not exist at all.</li>
   *           </ul>
   */
  public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch,
      List<File> paths) throws JavaGitException, IOException;

  /**
   * Checks out either an existing branch or new branch from the repository.
   * 
   * @param repositoryPath
   *          Path to the root of the repository
   * @param options
   *          <code>GitCheckoutOptions</code> object used for passing options to
   *          &lt;git-checkout&gt;
   * @param branch
   *          Name of the base branch that need to be checked out or if the new branch is being
   *          checkout based on this base branch.
   * @param file
   *          Single file that need to be checked out from the git repository
   * @return GitCheckoutResponse object
   * @throws JavaGitException thrown if -
   *           <ul>
   *           <li>if options passed are not correct.</li>
   *           <li>if the output for &lt;git-checkout&gt; command generated an error.</li>
   *           <li>if processBuilder not able to run the command.</li>
   *           </ul>
   * @throws IOException thrown if -
   *           <ul>
   *           <li>paths given do not have proper permissions.</li>
   *           <li>paths given do not exist at all.</li>
   *           </ul>
   */
  public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch,
      File file) throws JavaGitException, IOException;

  /**
   * Checks out either an existing branch or new branch from the repository.
   * 
   * @param repositoryPath
   *          Path to the root of the repository
   * @param options
   *          <code>GitCheckoutOptions</code> object used for passing options to
   *          &lt;git-checkout&gt;
   * @param branch
   *          Name of the base branch that need to be checked out or if the new branch is being
   *          checkout based on this base branch.
   * @return GitCheckoutResponse< object
   * @throws JavaGitException thrown if -
   *           <ul>
   *           <li>if options passed are not correct.</li>
   *           <li>if the output for &lt;git-checkout&gt; command generated an error.</li>
   *           <li>if processBuilder not able to run the command.</li>
   *           </ul>
   * @throws IOException thrown if -
   *           <ul>
   *           <li>paths given do not have proper permissions.</li>
   *           <li>paths given do not exist at all.</li>
   *           </ul>
   */
  public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch)
      throws JavaGitException, IOException;

  /**
   * Vanilla version of &lt;git-checkout&gt; where no options and no branch info is passed to it and
   * files are checked out from current branch.
   * 
   * @param repositoryPath
   *          path to the root of the repository
   * @throws JavaGitException thrown if -
   *           <ul>
   *           <li>if options passed are not correct.</li>
   *           <li>if the output for &lt;git-checkout&gt; command generated an error.</li>
   *           <li>if processBuilder not able to run the command.</li>
   *           </ul>
   * @throws IOException thrown if -
   *           <ul>
   *           <li>paths given do not have proper permissions.</li>
   *           <li>paths given do not exist at all.</li>
   *           </ul>
   */
  public GitCheckoutResponse checkout(File repositoryPath) throws JavaGitException, IOException;

  /**
   * Checks out an existing branch with no options provided.
   * 
   * @param repositoryPath
   *          path to the root of the repository
   * @param branch
   *          name of the base branch that need to be checked out
   * @return GitCheckoutResponse object
   * @throws JavaGitException thrown if -
   *           <ul>
   *           <li>if the output for &lt;git-checkout&gt; command generated an error.</li>
   *           <li>if processBuilder not able to run the command.</li>
   *           </ul>
   * @throws IOException thrown if -
   *           <ul>
   *           <li>paths given do not have proper permissions.</li>
   *           <li>paths given do not exist at all.</li>
   *           </ul>
   */
  public GitCheckoutResponse checkout(File repositoryPath, Ref branch) throws JavaGitException,
      IOException;

  /**
   * &lt;git-checkout&gt; where a list of files is given to be checked out from current branch of
   * the repository.
   * 
   * @param repositoryPath
   *          path to the root of the repository
   * @param paths
   *          list of file paths or directory that need to be checked out from git repository.
   * @return GitCheckoutResponse object
   * @throws JavaGitException thrown if -
   *           <ul>
   *           <li>if the output for &lt;git-checkout&gt; command generated an error.</li>
   *           <li>if processBuilder not able to run the command.</li>
   *           </ul>
   * @throws IOException thrown if -
   *           <ul>
   *           <li>paths given do not have proper permissions.</li>
   *           <li>paths given do not exist at all.</li>
   *           </ul>
   */
  public GitCheckoutResponse checkout(File repositoryPath, List<File> paths)
      throws JavaGitException, IOException;

  /**
   * &lt;git-checkout&gt; where a list of files is given to be checked out with tree-ish option set.
   * 
   * @param repositoryPath
   *          path to the root of the repository
   * @param treeIsh
   *          RefType object
   * @param paths
   *          List of files to be checked out.
   * @return GitCheckoutResponse object
   * @throws JavaGitException thrown if -
   *           <li>if the output for &lt;git-checkout&gt; command generated an error.</li>
   *           <li>if processBuilder not able to run the command.</li>
   *           </ul>
   * @throws IOException thrown if -
   *           <ul>
   *           <li>paths given do not have proper permissions.</li>
   *           <li>paths given do not exist at all.</li>
   *           </ul>
   */
  public GitCheckoutResponse checkout(File repositoryPath, Ref treeIsh, List<File> paths)
      throws JavaGitException, IOException;
} public interface IGitClone {
  /**
   * Clones a git repository, without any option, in default directory i.e. the directory name which
   * the URL contains.
   * 
   * @param workingDirectoryPath
   *          A <code>File</code> instance for the path to the working directory. This argument
   *          must represent the absolute path to the desired directory as returned by the
   *          <code>File.getPath()</code> method. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @param repository
   *          A <code>URL</code> instance for the repository to be cloned. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @return The result of the git clone.
   * @throws IOException
   *           There are many reasons for which an <code>IOException</code> may be thrown.
   *           Examples include:
   *           <ul>
   *           <li>a directory doesn't exist</li>
   *           <li>a command is not found on the PATH</li>
   *           </ul>
   * @throws JavaGitException
   *           Thrown when there is an error executing git-clone.
   */
  public GitCloneResponse clone(File workingDirectoryPath, URL repository) throws IOException,
      JavaGitException;

  /**
   * Clones a git repository with specified options in default directory i.e. the directory name
   * which the URL contains.
   * 
   * @param workingDirectoryPath
   *          A <code>File</code> instance for the path to the working directory. This argument
   *          must represent the absolute path to the desired directory as returned by the
   *          <code>File.getPath()</code> method. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options for the git-clone command. If the value is null, a
   *          <code>NullPointerException</code> will be thrown.
   * @param repository
   *          A <code>URL</code> instance for the repository to be cloned. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @return The result of the git clone.
   * @throws IOException
   *           There are many reasons for which an <code>IOException</code> may be thrown.
   *           Examples include:
   *           <ul>
   *           <li>a directory doesn't exist</li>
   *           <li>a command is not found on the PATH</li>
   *           </ul>
   * @throws JavaGitException
   *           Thrown when there is an error executing git-clone.
   */
  public GitCloneResponse clone(File workingDirectoryPath, GitCloneOptions options, URL repository)
      throws IOException, JavaGitException;

  /**
   * Clones a git repository into given directory, without any option.
   * 
   * @param workingDirectoryPath
   *          A <code>File</code> instance for the path to the working directory. This argument
   *          must represent the absolute path to the desired directory as returned by the
   *          <code>File.getPath()</code> method. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @param repository
   *          A <code>URL</code> instance for the repository to be cloned. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @param directory
   *          A <code>File</code> instance for the directory where the repository is to be cloned.
   *          If null is passed, a <code>NullPointerException</code> will be thrown.
   * @return The result of the git clone.
   * @throws IOException
   *           There are many reasons for which an <code>IOException</code> may be thrown.
   *           Examples include:
   *           <ul>
   *           <li>a directory doesn't exist</li>
   *           <li>a command is not found on the PATH</li>
   *           </ul>
   * @throws JavaGitException
   *           Thrown when there is an error executing git-clone.
   */
  public GitCloneResponse clone(File workingDirectoryPath, URL repository, File directory)
      throws IOException, JavaGitException;

  /**
   * Clones a git repository into given directory, with the specified options.
   * 
   * @param workingDirectoryPath
   *          A <code>File</code> instance for the path to the working directory. This argument
   *          must represent the absolute path to the desired directory as returned by the
   *          <code>File.getPath()</code> method. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options for the git-clone command. If the value is null, a
   *          <code>NullPointerException</code> will be thrown.
   * @param repository
   *          A <code>URL</code> instance for the repository to be cloned. If null is passed, a
   *          <code>NullPointerException</code> will be thrown.
   * @param directory
   *          A <code>File</code> instance for the directory where the repository is to be cloned.
   *          If null is passed, a <code>NullPointerException</code> will be thrown.
   * @return The result of the git clone.
   * @throws IOException
   *           There are many reasons for which an <code>IOException</code> may be thrown.
   *           Examples include:
   *           <ul>
   *           <li>a directory doesn't exist</li>
   *           <li>a command is not found on the PATH</li>
   *           </ul>
   * @throws JavaGitException
   *           Thrown when there is an error executing git-clone.
   */
  public GitCloneResponse clone(File workingDirectoryPath, GitCloneOptions options, URL repository,
      File directory) throws IOException, JavaGitException;
} public interface IGitCommit {

  /**
   * Automatically stage all tracked files that have been changed and then commit all files staged
   * in the git repository's index.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to commit against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param message
   *          The message to attach to the commit. A non-zero length argument is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitCommitResponseImpl commitAll(File repository, String message) throws IOException,
      JavaGitException;

  /**
   * Commits staged changes into the specified repository. The specific files that are committed
   * depends on the options specified.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to commit against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options to commit with.
   * @param message
   *          The message to attach to the commit. A non-zero length argument is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitCommitResponseImpl commit(File repository, GitCommitOptions options, String message)
      throws IOException, JavaGitException;

  /**
   * Commits staged changes into the specified repository. The specific files that are committed
   * depends on the options and paths specified.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to commit against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options to commit with.
   * @param message
   *          The message to attach to the commit. A non-zero length argument is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @param paths
   *          A list of folders and/or files to commit. The paths specified in this list must all be
   *          relative to the path specified in the <code>repository</code> parameter as returned
   *          by <code>File.getPath()</code>. A non-null and non-empty list is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results from the commit.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitCommitResponseImpl commit(File repository, GitCommitOptions options, String message,
      List<File> paths) throws IOException, JavaGitException;

  /**
   * Commit everything that is staged in the git repository's index.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to commit against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param message
   *          The message to attach to the commit. A non-zero length argument is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitCommitResponseImpl commit(File repository, String message) throws IOException,
      JavaGitException;

  /**
   * Commits only the changes in the specified paths into the specified repository. Any staged
   * changes (changes already defined in the index) are ignored.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to commit against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param message
   *          The message to attach to the commit. A non-zero length argument is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @param paths
   *          A list of folders and/or files to commit. The paths specified in this list must all be
   *          relative to the path specified in the <code>repository</code> parameter as returned
   *          by <code>File.getPath()</code>. A non-null and non-empty list is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results from the commit.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitCommitResponseImpl commitOnly(File repository, String message, List<File> paths)
      throws IOException, JavaGitException;

} public interface IGitDiff {

  // TODO: Create method signatures for this interface.

} public interface IGitInit {
	
	/**
	 * 
	 * @param repoDirectory The repository Directroy to be initialized as a git repository
	 * @param options	Option to be include while initializing a repository
	 * @return	GitInitResponse object
	 * @throws JavaGitException
	 * @throws IOException
	 */
	public GitInitResponse init(File repoDirectory, GitInitOptions options) throws JavaGitException, IOException;
	
	/**
	 * 
	 * @param repoDirectory The repository Directroy to be initialized as a git repository
	 * @return	GitInitResponse object
	 * @throws JavaGitException
	 * @throws IOException
	 */
	public GitInitResponse init(File repoDirectory) throws JavaGitException, IOException;

}
 public interface IGitLog {

	/**
	 * 
	 * @param repositoryPath	
	 *			A <code>File</code> instance for the path to the repository root (the parent
	 *          directory of the .git directory) or a sub-directory in the working tree of the
	 *          repository to move/rename against. This argument must represent the absolute path to 
	 *          the desired directory as returned by the <code>File.getPath()</code> method. If null 
	 *          is passed, a <code>NullPointerException</code> will be thrown.
	 *
	 * @param options	Specify option used to collect logs, see <code>GitLogOptions</code>
	 * @return A List of Commit objects
	 * @throws JavaGitException
	 * 			Thrown when there is an error executing git log.
	 * @throws IOException
	 * 			Thrown when there is an error executing git log.
	 */
	public List<Commit> log(File repositoryPath, GitLogOptions options) throws JavaGitException, IOException;
	
	/**
	 * 
	 * @param repositoryPath	
	 *			A <code>File</code> instance for the path to the repository root (the parent
	 *          directory of the .git directory) or a sub-directory in the working tree of the
	 *          repository to move/rename against. This argument must represent the absolute path to 
	 *          the desired directory as returned by the <code>File.getPath()</code> method. If null 
	 *          is passed, a <code>NullPointerException</code> will be thrown.
	 *
	 * @return A List of Commit objects
	 * @throws JavaGitException
	 * 			Thrown when there is an error executing git log.
	 * @throws IOException
	 * 			Thrown when there is an error executing git log.
	 */
	public List<Commit> log(File repositoryPath) throws JavaGitException, IOException;
} public interface IGitMv {
  /**
   * Moves the specified source file/symlink/directory to the destination file/symlink/directory. If
   * destination is non-existant then same as rename.
   * 
   * @param repositoryPath
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to move/rename against. This argument must represent the absolute path to 
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null 
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param source
   *          The source file/folder/symlink which is to be renamed or moved to a different
   *          location. It should be relative to the path specified in the <code>repository</code> 
   *          parameter as returned by <code>File.getPath()</code>. A non-zero length argument is 
   *          required for this parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @param destination
   *          The destination file/folder/symlink which the source is renamed or moved to. It 
   *          should be relative to the path specified in the <code>repository</code> 
   *          parameter as returned by <code>File.getPath()</code>. A non-zero length argument is 
   *          required for this parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results from the git-mv. 
   *           It is expected that GitMv does not notify when a move was successful. This follows 
   *           the response that git-mv itself gives. If the move/rename fails for any reason, 
   *           proper exception messages are generated and thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error excecuting git-mv.
   */
  public GitMvResponse mv(File repositoryPath, File source, File destination)
      throws IOException, JavaGitException;
  
  /**
   * Moves the specified source file/symlink/directory to the destination file/symlink/directory. If
   * destination is non-existant then same as rename.
   * 
   * @param repositoryPath
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to move/rename against. This argument must represent the absolute path to 
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null 
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options to git-mv command.
   * @param source
   *          The source file/folder/symlink which is to be renamed or moved to a different
   *          location. It should be relative to the path specified in the <code>repository</code> 
   *          parameter as returned by <code>File.getPath()</code>. A non-zero length argument is 
   *          required for this parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @param destination
   *          The destination file/folder/symlink which the source is renamed or moved to. It 
   *          should be relative to the path specified in the <code>repository</code> 
   *          parameter as returned by <code>File.getPath()</code>. A non-zero length argument is 
   *          required for this parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results from the git-mv. 
   *           It is expected that GitMv does not notify when a move was successful. This follows 
   *           the response that git-mv itself gives. If the move/rename fails for any reason, 
   *           proper exception messages are generated and thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error excecuting git-mv.
   */
  public GitMvResponse mv(File repositoryPath, GitMvOptions options, File source,
      File destination) throws IOException, JavaGitException;

  /**
   * Moves the specified source files/symlinks/directories to the destination directory. 
   * 
   * @param repositoryPath
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to move/rename against. This argument must represent the absolute path to 
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null 
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param sources
   *          The <code>List</code> of source file/folder/symlink which are to be moved to a 
   *          different location. The paths specified in this list must all be relative to the 
   *          path specified in the <code>repository</code> parameter as returned by 
   *          <code>File.getPath()</code>. A non-zero length argument is required for this 
   *          parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @param destination
   *          The destination file/folder/symlink which the source is renamed or moved to. It 
   *          should be relative to the path specified in the <code>repository</code> 
   *          parameter as returned by <code>File.getPath()</code>. A non-zero length argument is 
   *          required for this parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results from the git-mv. 
   *           It is expected that GitMv does not notify when a move was successful. This follows 
   *           the response that git-mv itself gives. If the move/rename fails for any reason, 
   *           proper exception messages are generated and thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error executing git-mv.
   */
  public GitMvResponse mv(File repositoryPath, List<File> sources, File destination) 
      throws IOException, JavaGitException;
  
  /**
   * Moves the specified source files/symlinks/directories to the destination directory. 
   * 
   * @param repositoryPath
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to move/rename against. This argument must represent the absolute path to 
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null 
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options to git-mv command.
   * @param sources
   *          The <code>List</code> of source file/folder/symlink which are to be moved to a 
   *          different location. The paths specified in this list must all be relative to the 
   *          path specified in the <code>repository</code> parameter as returned by 
   *          <code>File.getPath()</code>. A non-zero length argument is required for this 
   *          parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @param destination
   *          The destination file/folder/symlink which the source is renamed or moved to. It 
   *          should be relative to the path specified in the <code>repository</code> 
   *          parameter as returned by <code>File.getPath()</code>. A non-zero length argument is 
   *          required for this parameter, otherwise a <code>NullPointerException</code> or 
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results from the git-mv. 
   *           It is expected that GitMv does not notify when a move was successful. This follows 
   *           the response that git-mv itself gives. If the move/rename fails for any reason, 
   *           proper exception messages are generated and thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error executing git-mv.
   */
  public GitMvResponse mv(File repositoryPath, GitMvOptions options, List<File> sources,
      File destination) throws IOException, JavaGitException;
} public interface IGitReset {

  /**
   * Perform a reset on the repository. The results of this method are what one would get by running
   * &quote;git-reset&quote; against the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to perform reset against. This argument must represent the absolute path to
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @return The results of the reset.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitResetResponse gitReset(File repository) throws IOException, JavaGitException;

  /**
   * Perform a reset on the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to perform reset against. This argument must represent the absolute path to
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options for a git-reset command. If the value is null, a
   *          <code>NullPointerException</code> will be thrown.
   * @return The results of the reset.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitResetResponse gitReset(File repository, GitResetOptions options) throws IOException,
      JavaGitException;

  /**
   * Perform a reset on the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to perform reset against. This argument must represent the absolute path to
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param commitName
   *          The name of the commit to reset to. If the value is null, a
   *          <code>NullPointerException</code> will be thrown.
   * @param paths
   *          A list of paths to folders or files to reset. The paths specified in this list must
   *          all be relative to the path specified in the <code>repository</code> parameter as
   *          returned by <code>File.getPath()</code>. A non-null and non-empty list is required
   *          for this parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results of the reset.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitResetResponse gitReset(File repository, Ref commitName, List<File> paths)
      throws IOException, JavaGitException;

  /**
   * Perform a reset on the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to perform reset against. This argument must represent the absolute path to
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param paths
   *          A list of paths to folders or files to reset. The paths specified in this list must
   *          all be relative to the path specified in the <code>repository</code> parameter as
   *          returned by <code>File.getPath()</code>. A non-null and non-empty list is required
   *          for this parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @return The results of the reset.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitResetResponse gitReset(File repository, List<File> paths) throws IOException,
      JavaGitException;

  /**
   * Perform a hard reset on the repository to the specified <code>CommitName</code>.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to perform reset against. This argument must represent the absolute path to
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param commitName
   *          The name of the commit to reset to. If the value is null, a
   *          <code>NullPointerException</code> will be thrown.
   * @return The results of the reset.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitResetResponse gitResetHard(File repository, Ref commitName) throws IOException,
      JavaGitException;

  /**
   * Perform a soft reset on the repository to the specified <code>CommitName</code>.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to perform reset against. This argument must represent the absolute path to
   *          the desired directory as returned by the <code>File.getPath()</code> method. If null
   *          is passed, a <code>NullPointerException</code> will be thrown.
   * @param commitName
   *          The name of the commit to reset to. If the value is null, a
   *          <code>NullPointerException</code> will be thrown.
   * @return The results of the reset.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitResetResponse gitResetSoft(File repository, Ref commitName) throws IOException,
      JavaGitException;

} public interface IGitRevert {

  // TODO: Create method signatures for this interface.

} public interface IGitRm {
  /**
   * Remove files relative to the path within the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to run rm against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param path
   *          A single file to remove. The specified path must be relative to the path specified in
   *          the <code>repository</code> parameter as returned by <code>File.getPath()</code>.
   *          If null is passed, a <code>NullPointerException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitRmResponse rm(File repository, File path) throws IOException, JavaGitException;

  /**
   * Remove files relative to the path within the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to run rm against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options to run rm with. If null is passed, a <code>NullPointerException</code>
   *          will be thrown.
   * @param path
   *          A single file to remove. The specified path must be relative to the path specified in
   *          the <code>repository</code> parameter as returned by <code>File.getPath()</code>.
   *          If null is passed, a <code>NullPointerException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitRmResponse rm(java.io.File repository, GitRmOptions options, File path)
      throws IOException, JavaGitException;

  /**
   * Remove files relative to the path within the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to run rm against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param paths
   *          A list of files to remove. The paths specified in this list must all be relative to
   *          the path specified in the <code>repository</code> parameter as returned by
   *          <code>File.getPath()</code>. A non-null and non-empty list is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitRmResponse rm(File repository, List<File> paths) throws IOException, JavaGitException;

  /**
   * Remove files relative to the path within the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to run rm against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param options
   *          The options to run rm with. If null is passed, a <code>NullPointerException</code>
   *          will be thrown.
   * @param paths
   *          A list of files or folders to remove. The paths specified in this list must all be
   *          relative to the path specified in the <code>repository</code> parameter as returned
   *          by <code>File.getPath()</code>. A non-null and non-empty list is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitRmResponse rm(File repository, GitRmOptions options, List<File> paths)
      throws IOException, JavaGitException;

  /**
   * Remove files relative to the path within the repository but only effect the index.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to run rm against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param paths
   *          A list of files to remove. The paths specified in this list must all be relative to
   *          the path specified in the <code>repository</code> parameter as returned by
   *          <code>File.getPath()</code>. A non-null and non-empty list is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitRmResponse rmCached(File repository, List<File> paths) throws IOException,
      JavaGitException;

  /**
   * Recursively remove files relative to the path within the repository.
   * 
   * @param repository
   *          A <code>File</code> instance for the path to the repository root (the parent
   *          directory of the .git directory) or a sub-directory in the working tree of the
   *          repository to run rm against. This argument must represent the absolute path to the
   *          desired directory as returned by the <code>File.getPath()</code> method. If null is
   *          passed, a <code>NullPointerException</code> will be thrown.
   * @param paths
   *          A list of files or folders to remove. The paths specified in this list must all be
   *          relative to the path specified in the <code>repository</code> parameter as returned
   *          by <code>File.getPath()</code>. A non-null and non-empty list is required for this
   *          parameter, otherwise a <code>NullPointerException</code> or
   *          <code>IllegalArgumentException</code> will be thrown.
   * @exception IOException
   *              There are many reasons for which an <code>IOException</code> may be thrown.
   *              Examples include:
   *              <ul>
   *              <li>a directory doesn't exist</li>
   *              <li>access to a file is denied</li>
   *              <li>a command is not found on the PATH</li>
   *              </ul>
   * @exception JavaGitException
   *              Thrown when there is an error making the commit.
   */
  public GitRmResponse rmRecursive(File repository, List<File> paths) throws IOException,
      JavaGitException;
} public interface IGitShow {

  // TODO: Create method signatures for this interface.

}
import edu.nyu.cs.javagit.client.IGitShow;
import edu.nyu.cs.javagit.client.IGitStatus;
import edu.nyu.cs.javagit.client.IClient;
import edu.nyu.cs.javagit.client.IGitAdd;
import edu.nyu.cs.javagit.client.IGitBranch;
import edu.nyu.cs.javagit.client.IGitCheckout;
import edu.nyu.cs.javagit.client.IGitClone;
import edu.nyu.cs.javagit.client.IGitCommit;
import edu.nyu.cs.javagit.client.IGitDiff;
import edu.nyu.cs.javagit.client.IGitGrep;
import edu.nyu.cs.javagit.client.IGitInit;
import edu.nyu.cs.javagit.client.IGitLog;
import edu.nyu.cs.javagit.client.IGitMv;
import edu.nyu.cs.javagit.client.IGitReset;
import edu.nyu.cs.javagit.client.IGitRevert;
import edu.nyu.cs.javagit.client.IGitRm;
/*
 * ====================================================================
 * Copyright (c) 2008 JavaGit Project.  All rights reserved.
 *
 * This software is licensed using the GNU LGPL v2.1 license.  A copy
 * of the license is included with the distribution of this source
 * code in the LICENSE.txt file.  The text of the license can also
 * be obtained at:
 *
 *   http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
 *
 * For more information on the JavaGit project, see:
 *
 *   http://www.javagit.com
 * ====================================================================
 */
package edu.nyu.cs.javagit.client.cli;


/**
 * Command-line implementation of the <code>IClient</code> interface.
 */
public class CliClient implements IClient {

  public IGitAdd getGitAddInstance() {
    return new CliGitAdd();
  }

  public IGitCommit getGitCommitInstance() {