Enum Class GitDiffOutput
- All Implemented Interfaces:
Serializable
,Comparable<GitDiffOutput>
,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionChecks the diff for whitespace errors, using the process return code to signal whether any are found.Allows the command to produce its default output, without providing any specific argument to adjust it.Shows only the names of changed files.Shows the names of changed files and a status describing the change.Generate patch output.Suppresses all diff output. -
Method Summary
Modifier and TypeMethodDescriptiongetFlag()
boolean
static GitDiffOutput
Returns the enum constant of this class with the specified name.static GitDiffOutput[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CHECK
Checks the diff for whitespace errors, using the process return code to signal whether any are found. -
DEFAULT
Allows the command to produce its default output, without providing any specific argument to adjust it. -
NAME_ONLY
Shows only the names of changed files. -
NAME_STATUS
Shows the names of changed files and a status describing the change. -
PATCH
Generate patch output. -
SUPPRESS
Suppresses all diff output.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
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
-