Class FileDiffOutput

    • Constructor Detail

      • FileDiffOutput

        public FileDiffOutput()
    • Method Detail

      • oldCommitId

        public abstract org.eclipse.jgit.lib.ObjectId oldCommitId()
        The 20 bytes SHA-1 object ID of the old git commit used in the diff.
      • newCommitId

        public abstract org.eclipse.jgit.lib.ObjectId newCommitId()
        The 20 bytes SHA-1 object ID of the new git commit used in the diff.
      • comparisonType

        public abstract ComparisonType comparisonType()
        Comparison type of old and new commits: against another patchset, parent or auto-merge.
      • changeType

        public abstract Patch.ChangeType changeType()
        The change type of the underlying file, e.g. added, deleted, renamed, etc...
      • patchType

        public abstract Optional<Patch.PatchType> patchType()
        The patch type of the underlying file, e.g. unified, binary , etc...
      • headerLines

        public abstract com.google.common.collect.ImmutableList<String> headerLines()
        A list of strings representation of the header lines of the FileHeader that is produced as output of the diff.
      • edits

        public abstract com.google.common.collect.ImmutableList<TaggedEdit> edits()
        The list of edits resulting from the diff hunks of the file.
      • size

        public abstract long size()
        The file size at the new commit.
      • sizeDelta

        public abstract long sizeDelta()
        Difference in file size between the old and new commits.
      • allEditsDueToRebase

        public boolean allEditsDueToRebase()
        A boolean indicating if all underlying edits of the file diff are due to rebase.
      • insertions

        public int insertions()
        Returns the number of inserted lines for the file diff.
      • deletions

        public int deletions()
        Returns the number of deleted lines for the file diff.
      • empty

        public static FileDiffOutput empty​(String filePath,
                                           org.eclipse.jgit.lib.ObjectId oldCommitId,
                                           org.eclipse.jgit.lib.ObjectId newCommitId)
        Returns an entity representing an unchanged file between two commits.
      • isEmpty

        public boolean isEmpty()
        Returns true if this entity represents an unchanged file between two commits.
      • weight

        public int weight()