Class NewRepository

java.lang.Object
io.github.jbastgen.stemma.app.git.NewRepository

public final class NewRepository extends Object
The rules behind the Create repository dialog: where the repository will be, whether what was typed is usable, and what the branch field says when Git Flow is switched on or off. Pure logic, no user interface.
  • Field Details

    • DEFAULT_BRANCH

      public static final String DEFAULT_BRANCH
      The initial branch of a plain new repository.
      See Also:
    • DEVELOPMENT_BRANCH

      public static final String DEVELOPMENT_BRANCH
      The development branch Git Flow creates.
      See Also:
  • Method Details

    • expandHome

      public static Path expandHome(String text, Path home)
      ~ and ~/… are the home folder; blank means the home folder.
    • fullPath

      public static Path fullPath(String location, String name, Path home)
      The folder the repository will be created in: the location with the name below it; null while the name is unusable.
    • branchAfterToggle

      public static String branchAfterToggle(boolean gitFlow, String current)
      What the branch field shows when Git Flow is switched on or off: the usual names are swapped, anything typed stays.
    • problem

      public static String problem(String location, String name, String branch, boolean gitFlow, Path home)
      The reason the repository cannot be created like this, or an empty string when it can.
    • gitFlowSummary

      public static String gitFlowSummary(String productionBranch)
      One line about what Git Flow will do, shown under the check box.