public class StashApplyCommand extends GitCommand<ObjectId>
repo| Constructor and Description |
|---|
StashApplyCommand(Repository repo)
Create command to apply the changes of a stashed commit
|
| Modifier and Type | Method and Description |
|---|---|
ObjectId |
call() |
StashApplyCommand |
ignoreRepositoryState(boolean willIgnoreRepositoryState)
Whether to ignore the repository state when applying the stash
|
void |
setApplyIndex(boolean applyIndex)
Whether to restore the index state
|
void |
setApplyUntracked(boolean applyUntracked)
Whether the command should restore untracked files
|
StashApplyCommand |
setStashRef(String stashRef)
Set the stash reference to apply
|
StashApplyCommand |
setStrategy(MergeStrategy strategy)
Set the
MergeStrategy to use. |
checkCallable, getRepository, setCallablepublic StashApplyCommand(Repository repo)
repo - the Repository to apply the stash
topublic StashApplyCommand setStashRef(String stashRef)
This will default to apply the latest stashed commit (stash@{0}) if unspecified
stashRef - name of the stash Ref to applythispublic StashApplyCommand ignoreRepositoryState(boolean willIgnoreRepositoryState)
willIgnoreRepositoryState - whether to ignore the repository state when applying the stashthispublic ObjectId call() throws GitAPIException, WrongRepositoryStateException, NoHeadException, StashApplyFailureException
Execute the command
Apply the changes in a stashed commit to the working directory and index
call in interface Callable<ObjectId>call in class GitCommand<ObjectId>GitAPIExceptionWrongRepositoryStateExceptionNoHeadExceptionStashApplyFailureExceptionpublic void setApplyIndex(boolean applyIndex)
applyIndex - true (default) if the command should restore the index statepublic StashApplyCommand setStrategy(MergeStrategy strategy)
MergeStrategy to use.strategy - The merge strategy to use in order to merge during this
command execution.thispublic void setApplyUntracked(boolean applyUntracked)
applyUntracked - true (default) if the command should restore untracked filesCopyright © 2018 Eclipse JGit Project. All rights reserved.