Package org.eclipse.jgit.api
Class ApplyCommand
- java.lang.Object
-
- org.eclipse.jgit.api.GitCommand<ApplyResult>
-
- org.eclipse.jgit.api.ApplyCommand
-
- All Implemented Interfaces:
Callable<ApplyResult>
public class ApplyCommand extends GitCommand<ApplyResult>
Apply a patch to files and/or to the index.- Since:
- 2.0
- See Also:
- Git documentation about apply
-
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplyResultcall()Executes theApplyCommandcommand with all the options and parameters collected by the setter methods (e.g.ApplyCommandsetPatch(InputStream in)-
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
-
-
-
Method Detail
-
setPatch
public ApplyCommand setPatch(InputStream in)
- Parameters:
in- the patch to apply- Returns:
- this instance
-
call
public ApplyResult call() throws GitAPIException, PatchFormatException, PatchApplyException
Executes theApplyCommandcommand with all the options and parameters collected by the setter methods (e.g.setPatch(InputStream)of this class. Each instance of this class should only be used for one invocation of the command. Don't call this method twice on an instance.- Specified by:
callin interfaceCallable<ApplyResult>- Specified by:
callin classGitCommand<ApplyResult>- Returns:
- an
ApplyResultobject representing the command result - Throws:
GitAPIExceptionPatchFormatExceptionPatchApplyException
-
-