Class GitFileDiff


  • public abstract class GitFileDiff
    extends Object
    Entity representing a modified file (added, deleted, modified, renamed, etc...) between two different git commits.
    • Constructor Detail

      • GitFileDiff

        public GitFileDiff()
    • Method Detail

      • edits

        public abstract com.google.common.collect.ImmutableList<Edit> edits()
        An ImmutableList of the modified regions in the file.
      • fileHeader

        public abstract String fileHeader()
        A string representation of the FileHeader.
      • oldPath

        public abstract Optional<String> oldPath()
        The file name at the old git tree identified by oldId()
      • newPath

        public abstract Optional<String> newPath()
        The file name at the new git tree identified by newId()
      • oldId

        public abstract org.eclipse.jgit.lib.AbbreviatedObjectId oldId()
        The 20 bytes SHA-1 object ID of the old git tree of the diff.
      • newId

        public abstract org.eclipse.jgit.lib.AbbreviatedObjectId newId()
        The 20 bytes SHA-1 object ID of the new git tree of the diff.
      • changeType

        public abstract Patch.ChangeType changeType()
        The change type associated with the file.
      • weight

        public int weight()
        Returns the size of the object in bytes.