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, setCallable
public 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 referencethis
public StashDropCommand setAll(boolean all)
all
- true
to drop all stashed commits, false
to
drop only the stashed commit set via calling
setStashRef(int)
this
public 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>
GitAPIException
Copyright © 2021 Eclipse JGit Project. All rights reserved.