Enum Class GitMergeConflictType

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

public enum GitMergeConflictType extends Enum<GitMergeConflictType>
  • Enum Constant Details

    • ADD_ADD

      public static final GitMergeConflictType ADD_ADD
    • CONTENT

      public static final GitMergeConflictType CONTENT
    • DELETE_MODIFY

      public static final GitMergeConflictType DELETE_MODIFY
    • DIRECTORY_FILE

      public static final GitMergeConflictType DIRECTORY_FILE
    • FILE_DIRECTORY

      public static final GitMergeConflictType FILE_DIRECTORY
    • IMPLICIT_DIRECTORY_RENAME

      public static final GitMergeConflictType IMPLICIT_DIRECTORY_RENAME
      Indicates a directory rename was detected, and git merge found 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 d which has files 1 and 2. If both files are moved from d to a it will trigger a directory rename. If a new file 3 is added to d and a/3 already exists, Git can't rename d/3 to a/3.

      Case 2: Imagine a directory d which has files 1 and 2 and a directory e which has files 3 and 4. If both files in d and e are moved to a it will trigger two directory renames. If a new file 3 is added to d, Git can't rename both d/3 and e/3 to a/3.

      This conflict is only possible in Git 2.18+.

      This conflict can produce 2 different Java types:

      Since:
      6.3
    • MODIFY_DELETE

      public static final GitMergeConflictType MODIFY_DELETE
    • RENAME_ADD

      public static final GitMergeConflictType RENAME_ADD
    • RENAME_DELETE

      public static final GitMergeConflictType RENAME_DELETE
    • RENAME_RENAME

      public static final GitMergeConflictType RENAME_RENAME
    • SPLIT_DIRECTORY_RENAME

      public static final GitMergeConflictType SPLIT_DIRECTORY_RENAME
      Indicates a directory rename was detected, but git merge could 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 d which has files 1, 2, 3 and 4. If 2 files are moved from d to a and 2 are moved to b, then Git can't choose a single target to be the directory a new file 5 was added to d.

      This conflict is only possible in Git 2.18+.

      Since:
      6.3
    • SUBMODULE

      public static final GitMergeConflictType SUBMODULE
    • UNKNOWN

      public static final GitMergeConflictType UNKNOWN
  • Method Details

    • values

      public static GitMergeConflictType[] 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 GitMergeConflictType 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
    • getReason

      public String getReason()
    • fromReason

      public static GitMergeConflictType fromReason(String reason)