java.lang.Object
org.eclipse.jgit.patch.PatchApplier
Applies a patch to files and the index.
After instantiating, applyPatch() should be called once.
- Since:
- 6.4
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA wrapper for returning both the applied tree ID and the applied files list, as well as file specific errors. -
Constructor Summary
ConstructorsConstructorDescriptionPatchApplier(Repository repo) PatchApplier(Repository repo, RevTree beforeTree, ObjectInserter oi) -
Method Summary
Modifier and TypeMethodDescriptionSets up thePatchApplierto apply patches even if they conflict.applyPatch(Patch p) Applies the given patch
-
Constructor Details
-
PatchApplier
- Parameters:
repo- repository to apply the patch in
-
PatchApplier
- Parameters:
repo- repository to apply the patch inbeforeTree- ID of the tree to apply the patch inoi- to be used for modifying objects
-
-
Method Details
-
applyPatch
Applies the given patch- Parameters:
p- the patch to apply.- Returns:
- the result of the patch
- Throws:
IOException- if an IO error occurred- Since:
- 6.6
-
allowConflicts
Sets up thePatchApplierto apply patches even if they conflict.- Returns:
- the
PatchApplierto apply any patches - Since:
- 6.10
-