Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.RefUpdate.link()


      return; // throw exception?

    if (head.getName().startsWith(Constants.R_HEADS)) {
      final RefUpdate newHead = clonedRepo.updateRef(Constants.HEAD);
      newHead.disableRefLog();
      newHead.link(head.getName());
      addMergeConfig(clonedRepo, head);
    }

    final RevCommit commit = parseCommit(clonedRepo, head);
View Full Code Here


      RefUpdate refUpdate = repo.updateRef(Constants.HEAD, ref == null);
      refUpdate.setForceUpdate(force);
      refUpdate.setRefLogMessage(refLogMessage + " to " + toName, false);
      Result updateResult;
      if (ref != null)
        updateResult = refUpdate.link(ref.getName());
      else {
        refUpdate.setNewObjectId(newCommit);
        updateResult = refUpdate.forceUpdate();
      }
View Full Code Here

        break;
      default:
        throw new JGitInternalException("Updating HEAD failed");
      }
      rup = repo.updateRef(Constants.HEAD);
      res = rup.link(headName);
      switch (res) {
      case FAST_FORWARD:
      case FORCED:
      case NO_CHANGE:
        break;
View Full Code Here

            JGitText.get().resettingHead, headName),
            ProgressMonitor.UNKNOWN);

        // update the HEAD
        RefUpdate refUpdate = repo.updateRef(Constants.HEAD, false);
        Result res = refUpdate.link(headName);
        switch (res) {
        case FAST_FORWARD:
        case FORCED:
        case NO_CHANGE:
          break;
View Full Code Here

         throw new Die(CLIText.get().cannotChekoutNoHeadsAdvertisedByRemote);
      if (!Constants.HEAD.equals(branch.getName()))
      {
         RefUpdate u = db.updateRef(Constants.HEAD);
         u.disableRefLog();
         u.link(branch.getName());
      }

      final RevCommit commit = parseCommit(branch);
      final RefUpdate u = db.updateRef(Constants.HEAD);
      u.setNewObjectId(commit);
View Full Code Here

    FileUtils.mkdir(new File(getDirectory(), "branches"));
    FileUtils.mkdir(new File(getDirectory(), "hooks"));

    RefUpdate head = updateRef(Constants.HEAD);
    head.disableRefLog();
    head.link(Constants.R_HEADS + Constants.MASTER);

    final boolean fileMode;
    if (getFS().supportsExecute()) {
      File tmp = File.createTempFile("try", "execute", getDirectory());
View Full Code Here

      return; // throw exception?

    if (head.getName().startsWith(Constants.R_HEADS)) {
      final RefUpdate newHead = repo.updateRef(Constants.HEAD);
      newHead.disableRefLog();
      newHead.link(head.getName());
      addMergeConfig(repo, head);
    }

    final RevCommit commit = parseCommit(repo, head);
View Full Code Here

      refUpdate.setForceUpdate(force);
      refUpdate.setRefLogMessage(refLogMessage + " to "
          + newCommit.getName(), false);
      Result updateResult;
      if (ref != null)
        updateResult = refUpdate.link(ref.getName());
      else {
        refUpdate.setNewObjectId(newCommit);
        updateResult = refUpdate.forceUpdate();
      }
View Full Code Here

    FileUtils.mkdir(new File(getDirectory(), "branches"));
    FileUtils.mkdir(new File(getDirectory(), "hooks"));

    RefUpdate head = updateRef(Constants.HEAD);
    head.disableRefLog();
    head.link(Constants.R_HEADS + Constants.MASTER);

    final boolean fileMode;
    if (getFS().supportsExecute()) {
      File tmp = File.createTempFile("try", "execute", getDirectory());
View Full Code Here

        break;
      default:
        throw new JGitInternalException("Updating HEAD failed");
      }
      rup = repo.updateRef(Constants.HEAD);
      res = rup.link(headName);
      switch (res) {
      case FAST_FORWARD:
      case FORCED:
      case NO_CHANGE:
        break;
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.