public class StashCreateCommand extends GitCommand<RevCommit>
repo| Constructor and Description |
|---|
StashCreateCommand(Repository repo)
Create a command to stash changes in the working directory and index
|
| Modifier and Type | Method and Description |
|---|---|
RevCommit |
call() |
StashCreateCommand |
setIncludeUntracked(boolean includeUntracked)
Whether to include untracked files in the stash.
|
StashCreateCommand |
setIndexMessage(String message)
Set the message used when committing index changes
|
StashCreateCommand |
setPerson(PersonIdent person)
Set the person to use as the author and committer in the commits made
|
StashCreateCommand |
setRef(String ref)
Set the reference to update with the stashed commit id If null, no
reference is updated
|
StashCreateCommand |
setWorkingDirectoryMessage(String message)
Set the message used when committing working directory changes
|
checkCallable, getRepository, setCallablepublic StashCreateCommand(Repository repo)
repo - a Repository object.public StashCreateCommand setIndexMessage(String message)
The message will be formatted with the current branch, abbreviated commit id, and short commit message when used.
message - the stash messagethispublic StashCreateCommand setWorkingDirectoryMessage(String message)
The message will be formatted with the current branch, abbreviated commit id, and short commit message when used.
message - the working directory messagethispublic StashCreateCommand setPerson(PersonIdent person)
person - the PersonIdent of the person who
creates the stash.thispublic StashCreateCommand setRef(String ref)
This value defaults to Constants.R_STASH
ref - the name of the Ref to updatethispublic StashCreateCommand setIncludeUntracked(boolean includeUntracked)
includeUntracked - whether to include untracked files in the stashthispublic RevCommit call() throws GitAPIException
Execute the command
Stash the contents on the working directory and index in separate commits and reset to the current HEAD commit.
call in interface Callable<RevCommit>call in class GitCommand<RevCommit>GitAPIExceptionCopyright © 2018 Eclipse JGit Project. All rights reserved.