@Test public void testCreatingNewBranchFromMaster() throws IOException, JavaGitException { GitCheckoutOptions options = new GitCheckoutOptions(); options.setOptB(Ref.createBranchRef("testBranch")); Ref branch = Ref.createBranchRef("master"); GitCheckoutResponse response = gitCheckout.checkout(repositoryDirectory, options, branch); assertEquals("New Branch created should be created with name- testBranch", "\"testBranch\"", response.getNewBranch().getName()); }
public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch) throws IOException, JavaGitException { CheckUtilities.checkFileValidity(repositoryPath); CheckUtilities.validateArgumentRefType(branch, RefType.BRANCH, "Branch name"); IClient client = ClientManager.getInstance().getPreferredClient(); IGitCheckout gitCheckout = client.getGitCheckoutInstance(); return gitCheckout.checkout(repositoryPath, options, branch); }
GitCheckout { public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch) throws IOException, JavaGitException { CheckUtilities.checkFileValidity(repositoryPath); CheckUtilities.validateArgumentRefType(branch, RefType.BRANCH, "Branch name"); IClient client = ClientManager.getInstance().getPreferredClient(); IGitCheckout gitCheckout = client.getGitCheckoutInstance(); return gitCheckout.checkout(repositoryPath, options, branch); } }
GitCheckout { public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch) throws IOException, JavaGitException { CheckUtilities.checkFileValidity(repositoryPath); CheckUtilities.validateArgumentRefType(branch, RefType.BRANCH, "Branch name"); IClient client = ClientManager.getInstance().getPreferredClient(); IGitCheckout gitCheckout = client.getGitCheckoutInstance(); return gitCheckout.checkout(repositoryPath, options, branch); }  }
GitCheckout { public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch) throws IOException, JavaGitException { CheckUtilities.checkFileValidity(repositoryPath); CheckUtilities.validateArgumentRefType(branch, RefType.BRANCH, "Branch name"); IClient client = ClientManager.getInstance().getPreferredClient(); IGitCheckout gitCheckout = client.getGitCheckoutInstance(); return gitCheckout.checkout(repositoryPath, options, branch); }  GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch); GitCheckoutResponse checkout(File repositoryPath, List<File> paths); GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch,
      File file); GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch,
      List<File> paths); GitCheckoutResponse checkout(File repositoryPath, Ref ref, List<File> paths); }
GitCheckout { public GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch) throws IOException, JavaGitException { CheckUtilities.checkFileValidity(repositoryPath); CheckUtilities.validateArgumentRefType(branch, RefType.BRANCH, "Branch name"); IClient client = ClientManager.getInstance().getPreferredClient(); IGitCheckout gitCheckout = client.getGitCheckoutInstance(); return gitCheckout.checkout(repositoryPath, options, branch); }  GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch); GitCheckoutResponse checkout(File repositoryPath, List<File> paths); GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch,
      File file); GitCheckoutResponse checkout(File repositoryPath, GitCheckoutOptions options, Ref branch,
      List<File> paths); GitCheckoutResponse checkout(File repositoryPath, Ref ref, List<File> paths);  }