Examples of disableRefLog()


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

    git.add().addFilepattern("file.txt").call();
    RevCommit commit = git.commit().setMessage("create file").call();

    RefUpdate update = db.updateRef(Constants.R_STASH);
    update.setNewObjectId(commit);
    update.disableRefLog();
    assertEquals(Result.NEW, update.update());

    StashListCommand command = Git.wrap(db).stashList();
    Collection<RevCommit> stashed = command.call();
    assertNotNull(stashed);
View Full Code Here

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

    FileUtils.mkdir(new File(getDirectory(), "branches")); //$NON-NLS-1$
    FileUtils.mkdir(new File(getDirectory(), "hooks")); //$NON-NLS-1$

    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()); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

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

    if (head == null || head.getObjectId() == null)
      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

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

  }

  private boolean linkHEAD(RefUpdate target) {
    try {
      RefUpdate u = refdb.newUpdate(Constants.HEAD, false);
      u.disableRefLog();
      switch (u.link(target.getName())) {
      case NEW:
      case FORCED:
      case NO_CHANGE:
        return true;
View Full Code Here

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

  private void doCheckout(final Ref branch) throws IOException {
    if (branch == null)
      throw 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);
View Full Code Here

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

    }
  }

  private RefUpdate createRefUpdate(final Ref stashRef) throws IOException {
    RefUpdate update = repo.updateRef(R_STASH);
    update.disableRefLog();
    update.setExpectedOldObjectId(stashRef.getObjectId());
    update.setForceUpdate(true);
    return update;
  }
View Full Code Here

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

    return util.getRevWalk().parseCommit(ref.getObjectId());
  }

  private void update(RevCommit rev) throws Exception {
    RefUpdate u = db.updateRef(GitRepositoryManager.REF_CONFIG);
    u.disableRefLog();
    u.setNewObjectId(rev);
    switch (u.forceUpdate()) {
      case FAST_FORWARD:
      case FORCED:
      case NEW:
View Full Code Here

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

  private void doCheckout(final Ref branch) throws IOException {
    if (branch == null)
      throw die(CLIText.get().cannotChekoutNoHeadsAdvertisedByRemote);
    if (!Constants.HEAD.equals(branch.getName())) {
      RefUpdate u = db.updateRef(Constants.HEAD);
      u.disableRefLog();
      u.link(branch.getName());
    }

    final Commit commit = db.mapCommit(branch.getObjectId());
    final RefUpdate u = db.updateRef(Constants.HEAD);
View Full Code Here

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

  }

  private boolean linkHEAD(RefUpdate target) {
    try {
      RefUpdate u = refdb.newUpdate(Constants.HEAD, false);
      u.disableRefLog();
      switch (u.link(target.getName())) {
      case NEW:
      case FORCED:
      case NO_CHANGE:
        return true;
View Full Code Here

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

    objectDatabase.create();

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

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

    cfg.setInt(ConfigConstants.CONFIG_CORE_SECTION, null,
        ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION, 0);
    cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
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.