org.eclipse.jgit.api
Class StashDropCommand
java.lang.Object
org.eclipse.jgit.api.GitCommand<ObjectId>
org.eclipse.jgit.api.StashDropCommand
- All Implemented Interfaces:
- Callable<ObjectId>
public class StashDropCommand
- extends GitCommand<ObjectId>
Command class to delete a stashed commit reference
- Since:
- 2.0
- See Also:
- Git documentation about Stash
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StashDropCommand
public StashDropCommand(Repository repo)
- Parameters:
repo
-
setStashRef
public StashDropCommand setStashRef(int stashRef)
- Set the stash reference to drop (0-based).
This will default to drop the latest stashed commit (stash@{0}) if
unspecified
- Parameters:
stashRef
-
- Returns:
this
setAll
public StashDropCommand setAll(boolean all)
- Set wheter drop all stashed commits
- Parameters:
all
- true to drop all stashed commits, false to drop only the
stashed commit set via calling setStashRef(int)
- Returns:
this
call
public ObjectId call()
throws GitAPIException
- Drop the configured entry from the stash reflog and return value of the
stash reference after the drop occurs
- Specified by:
call
in interface Callable<ObjectId>
- Specified by:
call
in class GitCommand<ObjectId>
- Returns:
- commit id of stash reference or null if no more stashed changes
- Throws:
GitAPIException
Copyright © 2012. All Rights Reserved.