Package com.google.gerrit.entities
Class Patch
java.lang.Object
com.google.gerrit.entities.Patch
Wrapper class for patch related aspects. Originally, this class represented a single modified
file in a
PatchSet
. It's only kept in its current form as Patch.ChangeType
and Patch.PatchType
are used in diff cache entries for which we would break the serialization if we moved
the enums somewhere else.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Type of modification made to the file path.static enum
Constants describing various file modes recognized by GIT.static class
static enum
Type of formatting for this patch. -
Field Summary
Fields -
Method Summary
-
Field Details
-
COMMIT_MSG
Magical file name which represents the commit message.- See Also:
-
MERGE_LIST
Magical file name which represents the merge list of a merge commit.- See Also:
-
PATCHSET_LEVEL
Magical file name which doesn't represent a file. Used specifically for patchset-level comments.- See Also:
-
-
Method Details
-
isMagic
Checks if the given path represents a magic file. A magic file is a generated file that is automatically included into changes. It does not exist in the commit of the patch set.- Parameters:
path
- the file path- Returns:
true
if the path represents a magic file, otherwisefalse
.
-
key
-