Class GitFileDiff
- java.lang.Object
- 
- com.google.gerrit.server.patch.gitfilediff.GitFileDiff
 
- 
 public abstract class GitFileDiff extends Object Entity representing a modified file (added, deleted, modified, renamed, etc...) between two different git commits.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classGitFileDiff.Builderstatic classGitFileDiff.Serializer
 - 
Constructor SummaryConstructors Constructor Description GitFileDiff()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static GitFileDiff.Builderbuilder()abstract Patch.ChangeTypechangeType()The change type associated with the file.abstract com.google.common.collect.ImmutableList<Edit>edits()AnImmutableListof the modified regions in the file.abstract StringfileHeader()A string representation of theFileHeader.booleanisEmpty()Returns true if the object was created using theempty(AbbreviatedObjectId, AbbreviatedObjectId, String)method.abstract org.eclipse.jgit.lib.AbbreviatedObjectIdnewId()The 20 bytes SHA-1 object ID of the new git tree of the diff.abstract Optional<Patch.FileMode>newMode()The file mode of the new file at the new git tree diff identified bynewId().abstract Optional<String>newPath()The file name at the new git tree identified bynewId()abstract org.eclipse.jgit.lib.AbbreviatedObjectIdoldId()The 20 bytes SHA-1 object ID of the old git tree of the diff.abstract Optional<Patch.FileMode>oldMode()The file mode of the old file at the old git tree diff identified byoldId().abstract Optional<String>oldPath()The file name at the old git tree identified byoldId()abstract Optional<Patch.PatchType>patchType()The patch type associated with the file.intweight()Returns the size of the object in bytes.
 
- 
- 
- 
Method Detail- 
editspublic abstract com.google.common.collect.ImmutableList<Edit> edits() AnImmutableListof the modified regions in the file.
 - 
fileHeaderpublic abstract String fileHeader() A string representation of theFileHeader.
 - 
oldPathpublic abstract Optional<String> oldPath() The file name at the old git tree identified byoldId()
 - 
newPathpublic abstract Optional<String> newPath() The file name at the new git tree identified bynewId()
 - 
oldIdpublic abstract org.eclipse.jgit.lib.AbbreviatedObjectId oldId() The 20 bytes SHA-1 object ID of the old git tree of the diff.
 - 
newIdpublic abstract org.eclipse.jgit.lib.AbbreviatedObjectId newId() The 20 bytes SHA-1 object ID of the new git tree of the diff.
 - 
oldModepublic abstract Optional<Patch.FileMode> oldMode() The file mode of the old file at the old git tree diff identified byoldId().
 - 
newModepublic abstract Optional<Patch.FileMode> newMode() The file mode of the new file at the new git tree diff identified bynewId().
 - 
changeTypepublic abstract Patch.ChangeType changeType() The change type associated with the file.
 - 
patchTypepublic abstract Optional<Patch.PatchType> patchType() The patch type associated with the file.
 - 
isEmptypublic boolean isEmpty() Returns true if the object was created using theempty(AbbreviatedObjectId, AbbreviatedObjectId, String)method.
 - 
weightpublic int weight() Returns the size of the object in bytes.
 - 
builderpublic static GitFileDiff.Builder builder() 
 
- 
 
-