Examples of branchCreate()


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

                       .setStartPoint("origin/" + context.getDevelop())
                       .call();
                }
                else
                {
                    git.branchCreate()
                       .setName(context.getDevelop())
                       .setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.NOTRACK)
                       .call();
                }
            }
View Full Code Here

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

               for (Ref branchRef : refs)
               {
                  String branchName = branchRef.getName();
                  if (branchName != null && branchName.endsWith(targetRef))
                  {
                     ref = repo.branchCreate().setName(targetRef).setUpstreamMode(SetupUpstreamMode.TRACK)
                              .setStartPoint("origin/" + targetRef).call();
                  }
               }
            }
View Full Code Here

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

                  {
                     ref = tags.get(version);

                     if (ref == null)
                     {
                        ref = repo.branchCreate().setName(version).setUpstreamMode(SetupUpstreamMode.TRACK)
                                 .setStartPoint("origin/" + version).call();
                     }
                  }
               }
            }
View Full Code Here

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

        Git git = null;
        try
        {
            git = Git.open( fileSet.getBasedir() );
            Ref branchResult = git.branchCreate().setName( branch ).call();
            getLogger().info( "created [" + branchResult.getName() + "]" );

            if ( getLogger().isDebugEnabled() )
            {
                for ( String branchName : getShortLocalBranchNames( git ) )
View Full Code Here

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

            JobMetadata jobMetadata = tx.createJob(projectMetadata);

            Git git = historyService.projectGitRepository(projectMetadata);
            try {
                git.branchCreate()
                        .setName(branchName)
                        .call();
            } finally {
                git.close();
            }
View Full Code Here

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

               for (Ref branchRef : refs)
               {
                  String branchName = branchRef.getName();
                  if (branchName != null && branchName.endsWith(targetRef))
                  {
                     ref = repo.branchCreate().setName(targetRef).setUpstreamMode(SetupUpstreamMode.TRACK)
                              .setStartPoint("origin/" + targetRef).call();
                  }
               }
            }
View Full Code Here

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

                  {
                     ref = tags.get(version);

                     if (ref == null)
                     {
                        ref = repo.branchCreate().setName(version).setUpstreamMode(SetupUpstreamMode.TRACK)
                                 .setStartPoint("origin/" + version).call();
                     }
                  }
               }
            }
View Full Code Here

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

               for (Ref branchRef : refs)
               {
                  String branchName = branchRef.getName();
                  if (branchName != null && branchName.endsWith(targetRef))
                  {
                     ref = repo.branchCreate().setName(targetRef).setUpstreamMode(SetupUpstreamMode.TRACK)
                              .setStartPoint("origin/" + targetRef).call();
                  }
               }
            }
         }
View Full Code Here

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

        return;
      }
    }

    // create a local branch and push the new branch back to the origin
    git.branchCreate().setName("protectme").call();
    RefSpec refSpec = new RefSpec("refs/heads/protectme:refs/heads/protectme");
    results = git.push().setCredentialsProvider(cp).setRefSpecs(refSpec).setRemote("origin").call();
    for (PushResult result : results) {
      RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/protectme");
      Status status = ref.getStatus();
View Full Code Here

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

   * @return branch ref
   * @throws Exception
   */
  protected Ref branch(File repo, String name) throws Exception {
    Git git = Git.open(repo);
    git.branchCreate().setName(name).call();
    return checkout(repo, name);
  }

  /**
   * Checkout branch
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.