javagit/src/main/java/edu/nyu/cs/javagit/client/cli/CliGitRm.java
private List<String> buildCommandLine(GitRmOptions options, File path, List<File> paths) {
    List<String> cmdline = new ArrayList<String>();

    cmdline.add(JavaGitConfiguration.getGitCommand());
    cmdline.add("rm");

    if (null != options) {
      if (options.isOptCached()) {
        cmdline.add("--cached");
      }
      if (options.isOptF()) {
        cmdline.add("-f");
      }
      if (options.isOptN()) {
        cmdline.add("-n");
      }
      if (options.isOptQ()) {
        cmdline.add("-q");
      }
      if (options.isOptR()) {
        cmdline.add("-r");
      }
    }
    if (null != path) {
      cmdline.add(path.getPath());
    } else {
      for (File f : paths) {
        cmdline.add(f.getPath());
      }
    }
    return cmdline;
  }
private List<String> buildCommandLine(GitRmOptions options, File path, List<File> paths) {
    List<String> cmdline = new ArrayList<String>();

    cmdline.add(JavaGitConfiguration.getGitCommand());
    cmdline.add("rm");

    if (null != options) {
      if (options.isOptCached()) {
        cmdline.add("--cached");
      }
      if (options.isOptF()) {
        cmdline.add("-f");
      }
      if (options.isOptN()) {
        cmdline.add("-n");
      }
      if (options.isOptQ()) {
        cmdline.add("-q");
      }
      if (options.isOptR()) {
        cmdline.add("-r");
      }
    }
    if (null != path) {
      cmdline.add(path.getPath());
    } else {
      for (File f : paths) {
        cmdline.add(f.getPath());
      }
    }
    return cmdline;
  }
private List < String > buildCommandLine ( GitRmOptions options , File path , List < File > paths ) { List < String > cmdline = new ArrayList < String > ( ) ; cmdline . add ( JavaGitConfiguration . getGitCommand ( ) ) ; cmdline . add ( "rm" ) ; if ( null != options ) { if ( options . isOptCached ( ) ) { cmdline . add ( "--cached" ) ; } if ( options . isOptF ( ) ) { cmdline . add ( "-f" ) ; } if ( options . isOptN ( ) ) { cmdline . add ( "-n" ) ; } if ( options . isOptQ ( ) ) { cmdline . add ( "-q" ) ; } if ( options . isOptR ( ) ) { cmdline . add ( "-r" ) ; } } if ( null != path ) { cmdline . add ( path . getPath ( ) ) ; } else { for ( File f : paths ) { cmdline . add ( f . getPath ( ) ) ; } } return cmdline ; }
Builds the command line.

@param options
The options to build with.
@param path
If just a single path, this is it.
@param paths
If there are multiple paths, these are they. <code>path</code> must be null for
these paths to be used.
@return The list of arguments for the command line.
Builds the command line .