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)
Deprecated.
use
setRestoreIndex(boolean) instead |
void |
setApplyUntracked(boolean applyUntracked)
Deprecated.
use
setRestoreUntracked(boolean) instead |
StashApplyCommand |
setRestoreIndex(boolean restoreIndex)
Whether to restore the index state
|
StashApplyCommand |
setRestoreUntracked(boolean restoreUntracked)
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, setCallable
public 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 applythis
public StashApplyCommand ignoreRepositoryState(boolean willIgnoreRepositoryState)
willIgnoreRepositoryState
- whether to ignore the repository state when applying the stashthis
public 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>
GitAPIException
WrongRepositoryStateException
NoHeadException
StashApplyFailureException
@Deprecated public void setApplyIndex(boolean applyIndex)
setRestoreIndex(boolean)
insteadapplyIndex
- true (default) if the command should restore the index statepublic StashApplyCommand setRestoreIndex(boolean restoreIndex)
restoreIndex
- true (default) if the command should restore the index statethis
public StashApplyCommand setStrategy(MergeStrategy strategy)
MergeStrategy
to use.strategy
- The merge strategy to use in order to merge during this
command execution.this
@Deprecated public void setApplyUntracked(boolean applyUntracked)
setRestoreUntracked(boolean)
insteadapplyUntracked
- true (default) if the command should restore untracked filespublic StashApplyCommand setRestoreUntracked(boolean restoreUntracked)
restoreUntracked
- true (default) if the command should restore untracked filesthis
Copyright © 2019 Eclipse JGit Project. All rights reserved.