org.eclipse.jgit.api
Class StashApplyCommand
java.lang.Object
org.eclipse.jgit.api.GitCommand<ObjectId>
org.eclipse.jgit.api.StashApplyCommand
- All Implemented Interfaces:
- Callable<ObjectId>
public class StashApplyCommand
- extends GitCommand<ObjectId>
Command class to apply a stashed commit.
- 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 |
StashApplyCommand
public StashApplyCommand(Repository repo)
- Create command to apply the changes of a stashed commit
- Parameters:
repo
-
setStashRef
public StashApplyCommand setStashRef(String stashRef)
- Set the stash reference to apply
This will default to apply the latest stashed commit (stash@{0}) if
unspecified
- Parameters:
stashRef
-
- Returns:
this
call
public ObjectId call()
throws GitAPIException,
WrongRepositoryStateException
- Apply the changes in a stashed commit to the working directory and index
- Specified by:
call
in interface Callable<ObjectId>
- Specified by:
call
in class GitCommand<ObjectId>
- Returns:
- id of stashed commit that was applied
- Throws:
GitAPIException
WrongRepositoryStateException
Copyright © 2012. All Rights Reserved.