Enum Class GitDiffOutput

java.lang.Object
java.lang.Enum<GitDiffOutput>
com.atlassian.bitbucket.scm.git.command.diff.GitDiffOutput
All Implemented Interfaces:
Serializable, Comparable<GitDiffOutput>, Constable

public enum GitDiffOutput extends Enum<GitDiffOutput>
Enumerates output modes for diff-core commands like diff, diff-tree and log. These modes are mutually exclusive, so they are defined as an enumeration rather than having distinct options on the associated builder.
Since:
4.5
  • Enum Constant Details

    • CHECK

      public static final GitDiffOutput CHECK
      Checks the diff for whitespace errors, using the process return code to signal whether any are found.
    • DEFAULT

      public static final GitDiffOutput DEFAULT
      Allows the command to produce its default output, without providing any specific argument to adjust it.
    • NAME_ONLY

      public static final GitDiffOutput NAME_ONLY
      Shows only the names of changed files.
    • NAME_STATUS

      public static final GitDiffOutput NAME_STATUS
      Shows the names of changed files and a status describing the change.
    • PATCH

      public static final GitDiffOutput PATCH
      Generate patch output.
    • SUPPRESS

      public static final GitDiffOutput SUPPRESS
      Suppresses all diff output.
  • Method Details

    • values

      public static GitDiffOutput[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GitDiffOutput valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getFlag

      @Nullable public String getFlag()
      Returns:
      the command line flag for this output mode, if any
    • isFlagged

      public boolean isFlagged()
      Returns:
      true if this mode requires a command line flag; otherwise, false