Examples of branchDelete()


Examples of org.eclipse.jgit.api.Git.branchDelete()

            String branchName = branchMetadata.getName();

            tx.deleteBranch(branchMetadata);

            try {
                git.branchDelete()
                        .setBranchNames(branchName)
                        .call();
            } finally {
                git.close();
            }
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchDelete()

        return;
      }
    }

    // delete the branch locally
    git.branchDelete().setBranchNames("protectme").call();

    // push a delete ref command
    refSpec = new RefSpec(":refs/heads/protectme");
    results = git.push().setCredentialsProvider(cp).setRefSpecs(refSpec).setRemote("origin").call();
    for (PushResult result : results) {
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchDelete()

    HttpServletRequest request = requestInfo.request;
    HttpServletResponse response = requestInfo.response;
    Git git = requestInfo.git;
    try {
      if (gitSegment != null) {
        DeleteBranchCommand cc = git.branchDelete();
        cc.setBranchNames(gitSegment);
        // TODO: the force flag should be passed in the API call
        cc.setForce(true);
        cc.call();
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchDelete()

    SWTBotShell selectDialog = openCompareWithDialog(menuLabel, UIText.CommitSelectDialog_WindowTitle);
    assertEquals(2, selectDialog.bot().table().rowCount());
    selectDialog.close();
    // cleanup: checkout again master and delete merged branch
    git.checkout().setName("refs/heads/master").call();
    git.branchDelete().setBranchNames(newBranch.getName()).setForce(true).call();
  }

  @Test
  public void testCompareWithIndex() throws Exception {
    String compareWithIndexActionLabel = util
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchDelete()

        for (Ref ref : call) {
            System.out.println("Branch-Created: " + ref + " " + ref.getName() + " " + ref.getObjectId().getName());
        }

        // run the delete-call
        git.branchDelete()
                .setBranchNames("testbranch")
                .call();

        call = new Git(repository).branchList().call();
        for (Ref ref : call) {
View Full Code Here

Examples of org.eclipse.jgit.api.Git.branchDelete()

        remoteGit.checkout().setName("develop").call();
        remoteGit.add().addFilepattern(".").call();
        remoteGit.commit().setMessage("initial commit").call();

        remoteGit.branchDelete().setBranchNames("master").setForce(true).call();

        remoteGit.branchCreate().setName(featureBranch).call();
       
        git = Git.cloneRepository().setDirectory(workDir).setURI("file://" + remoteGit.getRepository().getWorkTree().getPath()).setBranch(featureBranch).setCloneAllBranches(false).call();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.