Examples of forceUpdate()


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

      // expected
    }
    // rename without old name and detached head not allowed
    RefUpdate rup = git.getRepository().updateRef(Constants.HEAD, true);
    rup.setNewObjectId(initialCommit);
    rup.forceUpdate();
    try {
      git.branchRename().setNewName("detached").call();
    } catch (DetachedHeadException e) {
      // expected
    }
View Full Code Here

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

    refUpdate.setRefLogMessage(refLogMessage, false);
    if (currentRef != null)
      refUpdate.setExpectedOldObjectId(currentRef.getObjectId());
    else
      refUpdate.setExpectedOldObjectId(ObjectId.zeroId());
    refUpdate.forceUpdate();
  }

  private Ref getHead() throws GitAPIException {
    try {
      Ref head = repo.getRef(Constants.HEAD);
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.