Package org.eclipse.jgit.api

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


                  {
                     ref = tags.get(version);

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

               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

                  {
                     ref = tags.get(version);

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

               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

                  {
                     ref = tags.get(version);

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

      Git repo = gitUtils.init(project.getRootDirectory());

      gitUtils.addAll(repo);
      gitUtils.commitAll(repo, "initial commit");

      repo.branchCreate().setName(branchNames[1]).call();

      FileResource<?> file0 = project.getRootDirectory().getChild(files[0]).reify(FileResource.class);
      file0.createNewFile();
      gitUtils.add(repo, files[0]);
      gitUtils.commit(repo, "file added on " + branchNames[0]);
View Full Code Here

      Git repo = gitUtils.init(project.getRootDirectory());

      gitUtils.addAll(repo);
      gitUtils.commitAll(repo, "initial commit");

      repo.branchCreate().setName(branchNames[1]).call();

      FileResource<?> file0 = project.getRootDirectory().getChild(files[0]).reify(FileResource.class);
      file0.createNewFile();
      gitUtils.add(repo, files[0]);
      gitUtils.commit(repo, "file added on " + branchNames[0]);
View Full Code Here

            //if no local master exists, but a remote does, check it out
            if (!GitHelper.localBranchExists(git, context.getMaster()) && GitHelper.remoteBranchExists(git, context.getMaster()))
            {
                reporter.debugText(SHORT_NAME,"creating new local master branch from origin master");
                git.branchCreate()
                   .setName(context.getMaster())
                   .setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.SET_UPSTREAM)
                   .setStartPoint("origin/" + context.getMaster())
                   .call();
            }
View Full Code Here

            if (!GitHelper.localBranchExists(git, context.getDevelop()))
            {
                if (GitHelper.remoteBranchExists(git, context.getDevelop()))
                {
                    reporter.debugText(SHORT_NAME,"creating new local develop branch from origin develop");
                    git.branchCreate()
                       .setName(context.getDevelop())
                       .setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.SET_UPSTREAM)
                       .setStartPoint("origin/" + context.getDevelop())
                       .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.