Class GitFlowPlanner
java.lang.Object
io.github.jbastgen.stemma.gitflow.GitFlowPlanner
Says what setting Git Flow up would do, and what is wrong with the choices, without touching the repository: the wizard shows
this live, and
GitFlow.initialize(io.github.jbastgen.stemma.gitflow.GitFlowConfig) acts on the same facts, so the preview and the real run cannot disagree.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe facts of a repository the plan depends on.static final record -
Method Summary
Modifier and TypeMethodDescriptionLines that show what the prefixes give, for examplefeature/ → feature/login.Thegitflow.*keys of a configuration.static GitFlowPlanner.Planplan(GitFlowConfig config, GitFlowPlanner.Facts facts, boolean initialCommit) plan(GitFlowConfig, Set, Map, boolean, Map, boolean)for the facts of a repository.static GitFlowPlanner.Planplan(GitFlowConfig config, Set<String> local, Map<String, Set<String>> remote, boolean hasCommits, Map<String, String> current, boolean initialCommit) static booleanvalidBranchName(String name) Whether Git accepts the name for a branch.
-
Method Details
-
plan
public static GitFlowPlanner.Plan plan(GitFlowConfig config, GitFlowPlanner.Facts facts, boolean initialCommit) plan(GitFlowConfig, Set, Map, boolean, Map, boolean)for the facts of a repository. -
validBranchName
Whether Git accepts the name for a branch. -
keys
Thegitflow.*keys of a configuration. -
plan
public static GitFlowPlanner.Plan plan(GitFlowConfig config, Set<String> local, Map<String, Set<String>> remote, boolean hasCommits, Map<String, String> current, boolean initialCommit) - Parameters:
config- the wanted configurationlocal- the local branchesremote- the branches of the remotes by remote name (without the remote's name in front)hasCommits- whether the repository has a commit at allcurrent- the keys written now (gitflow.*); empty when nothing is set upinitialCommit- whether an empty first commit should be made when there is no commit yet
-
examples
Lines that show what the prefixes give, for examplefeature/ → feature/login.
-