Enum Class GitMergeConflictType
- All Implemented Interfaces:
Serializable,Comparable<GitMergeConflictType>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates a directory rename was detected, andgit mergefound a file with the same name already in the new directory or multiple directories were renamed to the same target and they each have files with the same name.Indicates a directory rename was detected, butgit mergecould not decide where to move one or more new files because the directory's contents were split evenly across multiple other directories. -
Method Summary
Modifier and TypeMethodDescriptionstatic GitMergeConflictTypefromReason(String reason) static GitMergeConflictTypeReturns the enum constant of this class with the specified name.static GitMergeConflictType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ADD_ADD
-
CONTENT
-
DELETE_MODIFY
-
DIRECTORY_FILE
-
FILE_DIRECTORY
-
IMPLICIT_DIRECTORY_RENAME
Indicates a directory rename was detected, andgit mergefound a file with the same name already in the new directory or multiple directories were renamed to the same target and they each have files with the same name.Case 1: Imagine a directory
dwhich has files1and2. If both files are moved fromdtoait will trigger a directory rename. If a new file3is added todanda/3already exists, Git can't renamed/3toa/3.Case 2: Imagine a directory
dwhich has files1and2and a directoryewhich has files3and4. If both files indandeare moved toait will trigger two directory renames. If a new file3is added tod, Git can't rename bothd/3ande/3toa/3.This conflict is only possible in Git 2.18+.
This conflict can produce 2 different Java types:
ConvergentDirectoryRenameGitMergeConflict: Multiple directories were renamed to a single target directory, and multiple directories had files with the same name (Case 2)ImplicitDirectoryRenameGitMergeConflict: A directory was renamed, but the target directory already contains a file or directory which prevents one or more files from being moved to it (Case 1)
- Since:
- 6.3
-
MODIFY_DELETE
-
RENAME_ADD
-
RENAME_DELETE
-
RENAME_RENAME
-
SPLIT_DIRECTORY_RENAME
Indicates a directory rename was detected, butgit mergecould not decide where to move one or more new files because the directory's contents were split evenly across multiple other directories.Imagine a directory
dwhich has files1,2,3and4. If 2 files are moved fromdtoaand 2 are moved tob, then Git can't choose a single target to be the directory a new file5was added tod.This conflict is only possible in Git 2.18+.
- Since:
- 6.3
-
SUBMODULE
-
UNKNOWN
-
-
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
-
getReason
-
fromReason
-