Examples of lookupCommit()


Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

    RevWalk revWalk = new RevWalk(db);
    ObjectId oldHeadObjectId = oldHead.getPeeledObjectId();
    if (oldHeadObjectId == null)
      oldHeadObjectId = oldHead.getObjectId();
    RevCommit oldHeadCommit = revWalk.lookupCommit(oldHeadObjectId);
    RevCommit srcCommit = revWalk.lookupCommit(src);
    return revWalk.isMergedInto(oldHeadCommit, srcCommit);
  }
}
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

      ref = repo.peel(ref);
      ObjectId objectId = ref.getPeeledObjectId();
      if (objectId == null)
        objectId = ref.getObjectId();

      RevCommit srcCommit = revWalk.lookupCommit(objectId);

      ObjectId headId = head.getObjectId();
      if (headId == null) {
        revWalk.parseHeaders(srcCommit);
        dco = new DirCacheCheckout(repo,
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

        return new MergeResult(srcCommit, srcCommit, new ObjectId[] {
            null, srcCommit }, MergeStatus.FAST_FORWARD,
            mergeStrategy, null, null);
      }

      RevCommit headCommit = revWalk.lookupCommit(headId);

      if (revWalk.isMergedInto(srcCommit, headCommit)) {
        setCallable(false);
        return new MergeResult(headCommit, srcCommit, new ObjectId[] {
            headCommit, srcCommit },
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

    RevWalk walk = new RevWalk(db);
    try {
      String tagName = toPut.getString(ProtocolConstants.KEY_NAME);
      String commitId = toPut.getString(GitConstants.KEY_TAG_COMMIT);
      ObjectId objectId = db.resolve(commitId);
      RevCommit revCommit = walk.lookupCommit(objectId);

      Ref ref = tag(git, revCommit, tagName);
      URI cloneLocation = BaseToCloneConverter.getCloneLocation(getURI(request), BaseToCloneConverter.TAG_LIST);
      Tag tag = new Tag(cloneLocation, db, ref);
      OrionServlet.writeJSONResponse(request, response, tag.toJSON(), JsonURIUnqualificationStrategy.ALL_NO_GIT);
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

      int aheadCount = 0, behindCount = 0;
      if (mergeBaseFilter) {
        RevWalk walk = new RevWalk(db);
        try {
          walk.setRevFilter(RevFilter.MERGE_BASE);
          RevCommit toRevCommit = walk.lookupCommit(toObjectId);
          walk.markStart(toRevCommit);
          RevCommit fromRevCommit = walk.lookupCommit(fromObjectId);
          walk.markUninteresting(fromRevCommit);
          RevCommit next = walk.next();
          walk.reset();
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

        RevWalk walk = new RevWalk(db);
        try {
          walk.setRevFilter(RevFilter.MERGE_BASE);
          RevCommit toRevCommit = walk.lookupCommit(toObjectId);
          walk.markStart(toRevCommit);
          RevCommit fromRevCommit = walk.lookupCommit(fromObjectId);
          walk.markUninteresting(fromRevCommit);
          RevCommit next = walk.next();
          walk.reset();
          walk.setRevFilter(RevFilter.ALL);
          aheadCount = RevWalkUtils.count(walk, toRevCommit, next);
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

      throws JSONException, URISyntaxException, ServletException {
    Git git = new Git(db);
    RevWalk walk = new RevWalk(db);
    try {
      ObjectId objectId = db.resolve(commitId);
      RevCommit revCommit = walk.lookupCommit(objectId);
      walk.parseBody(revCommit);

      GitTagHandlerV1.tag(git, revCommit, tagName);

      URI cloneLocation = BaseToCloneConverter.getCloneLocation(getURI(request), BaseToCloneConverter.COMMIT_REFRANGE);
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

      StringBuilder refLogMessage = new StringBuilder("merge ");

      // Check for FAST_FORWARD, ALREADY_UP_TO_DATE
      RevWalk revWalk = new RevWalk(repo);
      try {
        RevCommit headCommit = revWalk.lookupCommit(head.getObjectId());

        Ref ref = commits.get(0);

        refLogMessage.append(ref.getName());
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

        // handle annotated tags
        ObjectId objectId = ref.getPeeledObjectId();
        if (objectId == null)
          objectId = ref.getObjectId();

        RevCommit srcCommit = revWalk.lookupCommit(objectId);
        if (revWalk.isMergedInto(srcCommit, headCommit)) {
          setCallable(false);
          return new MergeResult(headCommit,
              MergeStatus.ALREADY_UP_TO_DATE, mergeStrategy);
        } else if (revWalk.isMergedInto(headCommit, srcCommit)) {
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.lookupCommit()

      // handle annotated tags
      ObjectId objectId = ref.getPeeledObjectId();
      if (objectId == null)
        objectId = ref.getObjectId();

      RevCommit srcCommit = revWalk.lookupCommit(objectId);

      ObjectId headId = head.getObjectId();
      if (headId == null) {
        revWalk.parseHeaders(srcCommit);
        dco = new DirCacheCheckout(repo,
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.