Examples of newObjectInserter()


Examples of org.eclipse.jgit.internal.storage.file.FileRepository.newObjectInserter()

        JGitUtils.createOrphanBranch(repository, "gh-pages", null);
      }

      System.out.println("Updating gh-pages branch...");
      ObjectId headId = repository.resolve(ghpages + "^{commit}");
      ObjectInserter odi = repository.newObjectInserter();
      try {
        // Create the in-memory index of the new/updated issue.
        DirCache index = createIndex(repository, headId, sourceFolder,
            obliterate);
        ObjectId indexTreeId = index.writeTree(odi);
View Full Code Here

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

    final PersonIdent currentUserIdent = createPersonIdent();
    final Repository repo =
        repoManager.openRepository(projectControl.getProject().getNameKey());
    try {
      final RevWalk revWalk = new RevWalk(repo);
      final ObjectInserter inserter = repo.newObjectInserter();
      try {
        NoteMap baseNoteMap = null;
        RevCommit baseCommit = null;
        final Ref notesBranch = repo.getRef(REF_REJECT_COMMITS);
        if (notesBranch != null) {
View Full Code Here

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

          }
        });
      }
      ed.finish();

      ObjectInserter oi = pdb.newObjectInserter();
      ObjectId tree = dc.writeTree(oi);

      final CommitBuilder commit = new CommitBuilder();
      commit.setTreeId(tree);
      commit.setParentIds(new ObjectId[] {currentCommitId});
View Full Code Here

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

  public BatchMetaDataUpdate openUpdate(final MetaDataUpdate update) throws IOException {
    final Repository db = update.getRepository();

    reader = db.newObjectReader();
    inserter = db.newObjectInserter();
    final RevWalk rw = new RevWalk(reader);
    final RevTree tree = revision != null ? rw.parseTree(revision) : null;
    newTree = readTree(tree);
    return new BatchMetaDataUpdate() {
      AnyObjectId src = revision;
View Full Code Here

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

                .getRevision().get()));

        CommitBuilder rebasedCommitBuilder =
            rebaseCommit(git, originalCommit, branchTipCommit, myIdent);

        final ObjectInserter oi = git.newObjectInserter();
        final ObjectId rebasedCommitId;
        try {
          rebasedCommitId = oi.insert(rebasedCommitBuilder);
          oi.flush();
        } finally {
View Full Code Here

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

      revertCommit.setTreeId(parentToCommitToRevert.getTree());
      revertCommit.setAuthor(authorIdent);
      revertCommit.setCommitter(myIdent);
      revertCommit.setMessage(message);

      final ObjectInserter oi = git.newObjectInserter();;
      ObjectId id;
      try {
        id = oi.insert(revertCommit);
        oi.flush();
      } finally {
View Full Code Here

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

    }

    // build an initial commit
    boolean success = false;
    Repository db = app().repositories().getRepository(repositoryModel.name);
    ObjectInserter odi = db.newObjectInserter();
    try {

      UserModel user = GitBlitWebSession.get().getUser();
      String email = Optional.fromNullable(user.emailAddress).or(user.username + "@" + "gitblit");
      PersonIdent author = new PersonIdent(user.getDisplayName(), email);
View Full Code Here

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

    // One of our test packs contains the empty tree object. If the pack is
    // open when we create it we won't write the object file out as a loose
    // object (as it already exists in the pack).
    //
    final Repository newdb = createBareRepository();
    final ObjectInserter oi = newdb.newObjectInserter();
    final ObjectId treeId = oi.insert(new TreeFormatter());
    oi.release();

    assertEquals("4b825dc642cb6eb9a060e54bf8d69288fbee4904", treeId.name());
    final File o = new File(new File(new File(newdb.getDirectory(),
View Full Code Here

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

        JGitUtils.createOrphanBranch(repository, "gh-pages", null);
      }

      System.out.println("Updating gh-pages branch...");
      ObjectId headId = repository.resolve(ghpages + "^{commit}");
      ObjectInserter odi = repository.newObjectInserter();
      try {
        // Create the in-memory index of the new/updated issue.
        DirCache index = createIndex(repository, headId, sourceFolder,
            obliterate);
        ObjectId indexTreeId = index.writeTree(odi);
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.