Interface GitPatch

All Superinterfaces:
TextBasedDiff, VariationDiffSource
All Known Implementing Classes:
GitPatch.SimpleGitPatch, PatchDiff

public interface GitPatch extends VariationDiffSource, TextBasedDiff
Interface for patches from a git repository. A git patch is a TextBasedDiff from which VariationDiffs can be created.
  • Nested Class Summary Link icon

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Minimal default implementation of GitPatch
  • Field Summary Link icon

    Fields inherited from interface org.variantsync.diffdetective.variation.diff.source.VariationDiffSource Link icon

    Unknown
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    org.eclipse.jgit.diff.DiffEntry.ChangeType
    Returns the change type of this patch (e.g., file insertion or modification).
    Returns the hash of the commit introducing the change.
    Returns the name of the patched file at the given time.
    Returns the hash of the parent commit regarding which the diff was created.
    Creates a shallow clone.

    Methods inherited from interface org.variantsync.diffdetective.diff.text.TextBasedDiff Link icon

    getDiff
  • Method Details Link icon

    • getChangeType Link icon

      org.eclipse.jgit.diff.DiffEntry.ChangeType getChangeType()
      Returns the change type of this patch (e.g., file insertion or modification).
    • getFileName Link icon

      String getFileName(Time time)
      Returns the name of the patched file at the given time.
    • getCommitHash Link icon

      String getCommitHash()
      Returns the hash of the commit introducing the change.
    • getParentCommitHash Link icon

      String getParentCommitHash()
      Returns the hash of the parent commit regarding which the diff was created.
    • shallowClone Link icon

      GitPatch shallowClone()
      Creates a shallow clone. A shallow clone should return the very same values for the methods of this interface. Other behaviour is unspecified.
      Returns:
      A clone that acts equal with respect to this interface.