Package org.eclipse.jgit.revwalk

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


        PackIndex oldIdx = oldPack.getPackIndex(ctx);
        pm.beginTask("Finding garbage", (int) oldIdx.getObjectCount());
        for (PackIndex.MutableEntry ent : oldIdx) {
          pm.update(1);
          ObjectId id = ent.toObjectId();
          if (pool.lookupOrNull(id) != null || anyIndexHas(newIdx, id))
            continue;

          int type = oldPack.getObjectType(ctx, ent.getOffset());
          pw.addObject(pool.lookupAny(id, type));
        }
View Full Code Here


    pm.beginTask(JGitText.get().countingObjects, ProgressMonitor.UNKNOWN);
    for (DfsPackFile src : srcPacks) {
      List<ObjectIdWithOffset> want = new BlockList<ObjectIdWithOffset>();
      for (PackIndex.MutableEntry ent : src.getPackIndex(ctx)) {
        ObjectId id = ent.toObjectId();
        RevObject obj = rw.lookupOrNull(id);
        if (obj == null || !obj.has(added))
          want.add(new ObjectIdWithOffset(id, ent.getOffset()));
      }

      // Sort objects by the order they appear in the pack file, for
View Full Code Here

        PackIndex oldIdx = oldPack.getPackIndex(ctx);
        pm.beginTask("Finding garbage", (int) oldIdx.getObjectCount());
        for (PackIndex.MutableEntry ent : oldIdx) {
          pm.update(1);
          ObjectId id = ent.toObjectId();
          if (pool.lookupOrNull(id) != null || anyPackHas(id))
            continue;

          int type = oldPack.getObjectType(ctx, ent.getOffset());
          pw.addObject(pool.lookupAny(id, type));
        }
View Full Code Here

          // If the object was already requested, skip it.
          if (wantAll.isEmpty()) {
            if (wantIds.contains(objectId))
              continue;
          } else {
            RevObject obj = rw.lookupOrNull(objectId);
            if (obj != null && obj.has(WANT))
              continue;
          }

          if (!ref.isPeeled())
View Full Code Here

          // If the object was already requested, skip it.
          if (wantAll.isEmpty()) {
            if (wantIds.contains(objectId))
              continue;
          } else {
            RevObject obj = rw.lookupOrNull(objectId);
            if (obj != null && obj.has(WANT))
              continue;
          }

          if (!ref.isPeeled())
View Full Code Here

      for (DfsPackFile oldPack : packsBefore) {
        PackIndex oldIdx = oldPack.getPackIndex(ctx);
        for (PackIndex.MutableEntry ent : oldIdx) {
          pm.update(1);
          ObjectId id = ent.toObjectId();
          if (pool.lookupOrNull(id) != null || anyPackHas(id))
            continue;

          int type = oldPack.getObjectType(ctx, ent.getOffset());
          pw.addObject(pool.lookupAny(id, type));
        }
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.