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

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

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

    Unknown
  • Method Summary

    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

    getDiff
  • Method Details

    • getChangeType

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

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

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

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

      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.