public class StashDropCommand extends GitCommand<ObjectId>
Currently only supported on a traditional file repository using one-file-per-ref reflogs.
repo| Constructor and Description |
|---|
StashDropCommand(Repository repo)
Constructor for StashDropCommand.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectId |
call() |
StashDropCommand |
setAll(boolean all)
Set whether to drop all stashed commits
|
StashDropCommand |
setStashRef(int stashRef)
Set the stash reference to drop (0-based).
|
checkCallable, getRepository, setCallablepublic StashDropCommand(Repository repo)
repo - a Repository object.public StashDropCommand setStashRef(int stashRef)
This will default to drop the latest stashed commit (stash@{0}) if unspecified
stashRef - the 0-based index of the stash referencethispublic StashDropCommand setAll(boolean all)
all - true to drop all stashed commits, false to
drop only the stashed commit set via calling
setStashRef(int)thispublic ObjectId call() throws GitAPIException
Execute the command
Drop the configured entry from the stash reflog and return value of the stash reference after the drop occurs
call in interface Callable<ObjectId>call in class GitCommand<ObjectId>GitAPIExceptionCopyright © 2018 Eclipse JGit Project. All rights reserved.