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. -
Constructor Summary
ConstructorsConstructorDescriptionPatchApplier(Repository repo) PatchApplier(Repository repo, RevTree beforeTree, ObjectInserter oi) -
Method Summary
-
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- Throws:
IOException- in case of I/O errors
-
-
Method Details
-
applyPatch
public PatchApplier.Result applyPatch(InputStream patchInput) throws PatchFormatException, PatchApplyException Applies the given patch- Parameters:
patchInput- the patch to apply.- Returns:
- the result of the patch
- Throws:
PatchFormatException- if the patch cannot be parsedPatchApplyException- if the patch cannot be applied
-