Interface GitPatch
- All Superinterfaces:
TextBasedDiff
,VariationDiffSource
- All Known Implementing Classes:
GitPatch.SimpleGitPatch
,PatchDiff
Interface for patches from a git repository.
A git patch is a
TextBasedDiff
from which VariationDiff
s can be created.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
Minimal default implementation ofGitPatch
-
Field Summary
Fields inherited from interface org.variantsync.diffdetective.variation.diff.source.VariationDiffSource
Unknown
-
Method Summary
Modifier and TypeMethodDescriptionorg.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.getFileName
(Time time) 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
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.
-