public class HotfixStartCommand extends AbstractGitFlowCommand<org.eclipse.jgit.lib.Ref>
This will create a new branch using the hotfix prefix and release name from the tip of develop
Examples (flow is a JGitFlow instance):
Start a feature:
flow.hotfixStart("1.0.1").call();
Perform a fetch of develop before branching
flow.hotfixStart("1.0.1").setFetch(true).call();
gfConfig, git, reporter| Constructor and Description |
|---|
HotfixStartCommand(String hotfixName,
org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig,
JGitFlowReporter reporter)
Create a new hotfix start command instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jgit.lib.Ref |
call() |
protected String |
getCommandName() |
HotfixStartCommand |
setAllowUntracked(boolean allow) |
HotfixStartCommand |
setFetch(boolean fetch)
Set whether to perform a git fetch of the remote develop branch before branching
|
HotfixStartCommand |
setPush(boolean push)
Set whether to push the changes to the remote repository
|
HotfixStartCommand |
setScmMessagePrefix(String scmMessagePrefix) |
HotfixStartCommand |
setStartCommit(org.eclipse.jgit.revwalk.RevCommit commit) |
HotfixStartCommand |
setStartCommit(String commitId) |
getScmMessagePrefix, isAllowUntracked, requireCleanWorkingTree, requireCommitOnBranch, requireGitFlowInitialized, requireLocalBranchAbsent, requireLocalBranchExists, requireLocalBranchNotBehindRemote, requireNoExistingHotfixBranches, requireNoExistingReleaseBranches, requireRemoteBranchAbsent, requireRemoteBranchExists, requireTagAbsentpublic HotfixStartCommand(String hotfixName, org.eclipse.jgit.api.Git git, GitFlowConfiguration gfConfig, JGitFlowReporter reporter)
JGitFlow.hotfixStart(String)hotfixName - The name of the hotfixgit - The git instance to usegfConfig - The GitFlowConfiguration to usereporter - public HotfixStartCommand setAllowUntracked(boolean allow)
setAllowUntracked in class AbstractGitFlowCommand<org.eclipse.jgit.lib.Ref>public HotfixStartCommand setScmMessagePrefix(String scmMessagePrefix)
setScmMessagePrefix in class AbstractGitFlowCommand<org.eclipse.jgit.lib.Ref>public org.eclipse.jgit.lib.Ref call()
throws NotInitializedException,
JGitFlowGitAPIException,
HotfixBranchExistsException,
DirtyWorkingTreeException,
JGitFlowIOException,
LocalBranchExistsException,
TagExistsException,
BranchOutOfDateException,
LocalBranchMissingException,
RemoteBranchExistsException
NotInitializedExceptionJGitFlowGitAPIExceptionHotfixBranchExistsExceptionDirtyWorkingTreeExceptionJGitFlowIOExceptionLocalBranchExistsExceptionTagExistsExceptionBranchOutOfDateExceptionLocalBranchMissingExceptionRemoteBranchExistsExceptionpublic HotfixStartCommand setFetch(boolean fetch)
fetch - true to do the fetch, false(default) otherwisethispublic HotfixStartCommand setStartCommit(String commitId)
public HotfixStartCommand setStartCommit(org.eclipse.jgit.revwalk.RevCommit commit)
public HotfixStartCommand setPush(boolean push)
push - true to do the push, false(default) otherwisethisprotected String getCommandName()
getCommandName in class AbstractGitFlowCommand<org.eclipse.jgit.lib.Ref>Copyright © 2013 Atlassian. All Rights Reserved.