Examples of updateRef()


Examples of org.eclipse.jgit.lib.Repository.updateRef()

          // as a detached HEAD
          DirCacheCheckout co = new DirCacheCheckout(submoduleRepo,
              submoduleRepo.lockDirCache(), commit.getTree());
          co.setFailOnConflict(true);
          co.checkout();
          RefUpdate refUpdate = submoduleRepo.updateRef(
              Constants.HEAD, true);
          refUpdate.setNewObjectId(commit);
          refUpdate.forceUpdate();
        }
        updated.add(generator.getPath());
View Full Code Here

Examples of org.eclipse.jgit.storage.file.FileRepository.updateRef()

  public void oneOriginChange() throws Exception {
    RevCommit commit1 = add("test.txt", "content");
    File repo2 = initRepo();
    RevCommit commit2 = add(repo2, "test2.txt", "content2.txt");
    Repository repo = new FileRepository(testRepo);
    RefUpdate originMaster = repo.updateRef(Constants.R_REMOTES
        + Constants.DEFAULT_REMOTE_NAME + "/" + Constants.MASTER);
    originMaster.setNewObjectId(commit1);
    originMaster.forceUpdate();
    RemoteConfig config = new RemoteConfig(repo.getConfig(),
        Constants.DEFAULT_REMOTE_NAME);
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.