Examples of CommitBuilder


Examples of org.eclipse.jgit.lib.CommitBuilder

        // create a merge commit and a reference to track the merge commit
        ObjectId treeId = merger.getResultTreeId();
        ObjectInserter odi = repository.newObjectInserter();
        try {
          // Create a commit object
          CommitBuilder commitBuilder = new CommitBuilder();
          commitBuilder.setCommitter(committer);
          commitBuilder.setAuthor(committer);
          commitBuilder.setEncoding(Constants.CHARSET);
          if (StringUtils.isEmpty(message)) {
            message = MessageFormat.format("merge {0} into {1}", srcTip.getName(), branchTip.getName());
          }
          commitBuilder.setMessage(message);
          commitBuilder.setParentIds(branchTip.getId(), srcTip.getId());
          commitBuilder.setTreeId(treeId);

          // Insert the merge commit into the repository
          ObjectId mergeCommitId = odi.insert(commitBuilder);
          odi.flush();
View Full Code Here

Examples of org.eclipse.jgit.lib.CommitBuilder

      }

      ObjectId treeId = newIndex.writeTree(odi);

      // Create a commit object
      CommitBuilder commit = new CommitBuilder();
      commit.setAuthor(author);
      commit.setCommitter(author);
      commit.setEncoding(Constants.ENCODING);
      commit.setMessage("Initial commit");
      commit.setTreeId(treeId);

      // Insert the commit into the repository
      ObjectId commitId = odi.insert(commit);
      odi.flush();
View Full Code Here

Examples of org.locationtech.geogig.api.CommitBuilder

            }
        }

        final RevCommit commit;
        if (this.commit == null) {
            CommitBuilder cb = new CommitBuilder();
            cb.setAuthor(author);
            cb.setAuthorEmail(authorEmail);
            cb.setCommitter(committer);
            cb.setCommitterEmail(committerEmail);
            cb.setMessage(message);
            cb.setParentIds(parents);
            cb.setTreeId(newTreeId);
            cb.setCommitterTimestamp(committerTime);
            cb.setAuthorTimestamp(authorTime);
            cb.setCommitterTimeZoneOffset(committerTimeZoneOffset);
            cb.setAuthorTimeZoneOffset(authorTimeZoneOffset);
            commit = cb.build();
        } else {
            CommitBuilder cb = new CommitBuilder(this.commit);
            cb.setParentIds(parents);
            cb.setTreeId(newTreeId);
            cb.setCommitterTimestamp(committerTime);
            cb.setCommitterTimeZoneOffset(committerTimeZoneOffset);
            if (message != null) {
                cb.setMessage(message);
            }
            commit = cb.build();
        }

        if (getProgressListener().isCanceled()) {
            return 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.