code: protected boolean validBranchName(final String branchName)
              throws MojoFailureException, CommandLineException {
          CommandResult r = executeGitCommandExitCode("check-ref-format",
                  "--allow-onelevel", branchName);
          return r.getExitCode() == SUCCESS_EXIT_CODE;
      }
docs: Checks if branch name is acceptable.
  
  @param branchName
  Branch name to check.
  @return <code>true</code> when name is valid, <code>false</code>
  otherwise.
  @throws MojoFailureException
  @throws CommandLineException