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 class
A 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 TypeMethodDescriptionapplyPatch
(InputStream patchInput) Deprecated.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
@Deprecated public PatchApplier.Result applyPatch(InputStream patchInput) throws PatchFormatException, IOException Deprecated.useapplyPatch(Patch)
insteadApplies the given patch- Parameters:
patchInput
- the patch to apply.- Returns:
- the result of the patch
- Throws:
PatchFormatException
- if the patch cannot be parsedIOException
- if the patch read fails
-
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
-
applyPatch(Patch)
instead