Package org.eclipse.jgit.lib
Enum CommitConfig.CleanupMode
- java.lang.Object
-
- java.lang.Enum<CommitConfig.CleanupMode>
-
- org.eclipse.jgit.lib.CommitConfig.CleanupMode
-
- All Implemented Interfaces:
Serializable
,Comparable<CommitConfig.CleanupMode>
,Config.ConfigEnum
- Enclosing class:
- CommitConfig
public static enum CommitConfig.CleanupMode extends Enum<CommitConfig.CleanupMode> implements Config.ConfigEnum
How to clean up commit messages when committing.- Since:
- 6.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
UseSTRIP
for user-edited messages, otherwiseWHITESPACE
, unless overridden by a git config setting other than DEFAULT.SCISSORS
Omit everything from the first "scissor" line on, then applyWHITESPACE
.STRIP
WHITESPACE
, additionally remove comment lines.VERBATIM
Make no changes.WHITESPACE
Remove trailing whitespace and leading and trailing empty lines; collapse multiple empty lines to a single one.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matchConfigValue(String in)
Checks if the given string matches with enum value.String
toConfigValue()
Converts enumeration value into a string to be save in config.static CommitConfig.CleanupMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static CommitConfig.CleanupMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRIP
public static final CommitConfig.CleanupMode STRIP
WHITESPACE
, additionally remove comment lines.
-
WHITESPACE
public static final CommitConfig.CleanupMode WHITESPACE
Remove trailing whitespace and leading and trailing empty lines; collapse multiple empty lines to a single one.
-
VERBATIM
public static final CommitConfig.CleanupMode VERBATIM
Make no changes.
-
SCISSORS
public static final CommitConfig.CleanupMode SCISSORS
Omit everything from the first "scissor" line on, then applyWHITESPACE
.
-
DEFAULT
public static final CommitConfig.CleanupMode DEFAULT
UseSTRIP
for user-edited messages, otherwiseWHITESPACE
, unless overridden by a git config setting other than DEFAULT.
-
-
Method Detail
-
values
public static CommitConfig.CleanupMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CommitConfig.CleanupMode c : CommitConfig.CleanupMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CommitConfig.CleanupMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
toConfigValue
public String toConfigValue()
Description copied from interface:Config.ConfigEnum
Converts enumeration value into a string to be save in config.- Specified by:
toConfigValue
in interfaceConfig.ConfigEnum
- Returns:
- the enum value as config string
-
matchConfigValue
public boolean matchConfigValue(String in)
Description copied from interface:Config.ConfigEnum
Checks if the given string matches with enum value.- Specified by:
matchConfigValue
in interfaceConfig.ConfigEnum
- Parameters:
in
- the string to match- Returns:
- true if the given string matches enum value, false otherwise
-
-