javagit/src/main/java/edu/nyu/cs/javagit/api/commands/GitBranchOptions.java
public void setOptColor(boolean optColor) {
    checkCanSetNoArgOption("--color");
    if (optNoColor && optColor) {
      throw new IllegalArgumentException(ExceptionMessageMap.getMessage("000120")
          + "  --color cannot be used with --no-color.");
    } 
    this.optColor = optColor;
  }
public void setOptColor(boolean optColor) {
    checkCanSetNoArgOption("--color");
    if (optNoColor && optColor) {
      throw new IllegalArgumentException(ExceptionMessageMap.getMessage("000120")
          + "  --color cannot be used with --no-color.");
    } 
    this.optColor = optColor;
  }
Checks whether the --color option should be set and sets it.

@param optColor True if the --color option should be used, false otherwise.