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()
Apply the changes in a stashed commit to the working directory and index
|
StashApplyCommand |
ignoreRepositoryState(boolean ignoreRepositoryState) |
void |
setApplyIndex(boolean applyIndex) |
StashApplyCommand |
setStashRef(String stashRef)
Set the stash reference to apply
|
checkCallable, getRepository, setCallable
public StashApplyCommand(Repository repo)
repo
- public StashApplyCommand setStashRef(String stashRef)
This will default to apply the latest stashed commit (stash@{0}) if unspecified
stashRef
- this
public StashApplyCommand ignoreRepositoryState(boolean ignoreRepositoryState)
ignoreRepositoryState
- this
public ObjectId call() throws GitAPIException, WrongRepositoryStateException, NoHeadException, StashApplyFailureException
call
in interface Callable<ObjectId>
call
in class GitCommand<ObjectId>
GitAPIException
WrongRepositoryStateException
NoHeadException
StashApplyFailureException
public void setApplyIndex(boolean applyIndex)
applyIndex
- true (default) if the command should restore the index stateCopyright © 2013. All rights reserved.