javagit/src/main/java/edu/nyu/cs/javagit/api/JavaGitConfiguration.java
public static void setGitPath(File path) throws IOException, JavaGitException {
    if (path != null) {
      CheckUtilities.checkFileValidity(path);

      if (!(path.isDirectory())) {
        throw new JavaGitException(020002, ExceptionMessageMap.getMessage("020002") + " { path=["
            + path.getPath() + "] }");
      }
    }

    try {
       determineGitVersion(path);
    } catch (Exception e) {
      // The path that was passed in doesn't work. Catch any errors and throw this one instead.
      throw new JavaGitException(100002, ExceptionMessageMap.getMessage("100002") + " { path=["
          + path.getPath() + "] }", e);
    }

    // Make sure we're hanging onto an absolute path.
    gitPath = (path != null) ? path.getAbsoluteFile() : null;
  }
public static void setGitPath(File path) throws IOException, JavaGitException {
    if (path != null) {
      CheckUtilities.checkFileValidity(path);

      if (!(path.isDirectory())) {
        throw new JavaGitException(020002, ExceptionMessageMap.getMessage("020002") + " { path=["
            + path.getPath() + "] }");
      }
    }

    try {
       determineGitVersion(path);
    } catch (Exception e) {
      // The path that was passed in doesn't work. Catch any errors and throw this one instead.
      throw new JavaGitException(100002, ExceptionMessageMap.getMessage("100002") + " { path=["
          + path.getPath() + "] }", e);
    }

    // Make sure we're hanging onto an absolute path.
    gitPath = (path != null) ? path.getAbsoluteFile() : null;
  }
Called when client code wants to explicitly tell us where to find git on their filesystem. If
never called, we assume that git is in a directory in the PATH environment variable for this
process. Passing null as the path argument will unset an explicitly-set path and revert to
looking for git in the PATH.

@param path
<code>File</code> object representing the directory containing the git binaries. It
must contain either an absolute path, or a valid path relative to the current working
directory.
@throws IOException
Thrown if the provided path does not exist.
@throws JavaGitException
Thrown if git does not exist at the provided path, or the provided path is not a
directory.