/** * Include one object to the output file. * <p> * Objects are written in the order they are added. If the same object is * added twice, it may be written twice, creating a larger than necessary * file. * * @param object * the object to add. * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * the object is an unsupported type. */ public void addObject(RevObject object) throws IncorrectObjectTypeException { if (!exclude(object)) addObject(object, 0); }
private void findObjectsToPackUsingBitmaps( BitmapWalker bitmapWalker, Set<? extends ObjectId> want, Set<? extends ObjectId> have) throws MissingObjectException, IncorrectObjectTypeException, IOException { BitmapBuilder haveBitmap = bitmapWalker.findObjects(have, null, true); BitmapBuilder wantBitmap = bitmapWalker.findObjects(want, haveBitmap, false); BitmapBuilder needBitmap = wantBitmap.andNot(haveBitmap); if (useCachedPacks && reuseSupport != null && !reuseValidate && (excludeInPacks == null || excludeInPacks.length == 0)) cachedPacks.addAll( reuseSupport.getCachedPacksAndUpdate(needBitmap)); for (BitmapObject obj : needBitmap) { ObjectId objectId = obj.getObjectId(); if (exclude(objectId)) { needBitmap.remove(objectId); continue; } filterAndAddObject(objectId, obj.getType(), 0, want); } if (thin) haveObjects = haveBitmap; }
RevCommit c; while ((c = walker.next()) != null) { if (exclude(c)) continue; if (c.has(RevFlag.UNINTERESTING)) { RevCommit p = cmit.getParent(i); if (!p.has(added) && !p.has(RevFlag.UNINTERESTING) && !exclude(p)) { p.add(added); addObject(p, 0); if (o.has(RevFlag.UNINTERESTING)) continue; if (exclude(o)) continue; if (o.has(RevFlag.UNINTERESTING)) continue; if (exclude(o)) continue; filterAndAddObject(o, o.getType(), walker.getPathHashCode(), want);
/** * Include one object to the output file. * <p> * Objects are written in the order they are added. If the same object is * added twice, it may be written twice, creating a larger than necessary * file. * * @param object * the object to add. * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * the object is an unsupported type. */ public void addObject(RevObject object) throws IncorrectObjectTypeException { if (!exclude(object)) addObject(object, 0); }
/** * Include one object to the output file. * <p> * Objects are written in the order they are added. If the same object is * added twice, it may be written twice, creating a larger than necessary * file. * * @param object * the object to add. * @throws IncorrectObjectTypeException * the object is an unsupported type. */ public void addObject(final RevObject object) throws IncorrectObjectTypeException { if (!exclude(object)) addObject(object, 0); }
private void findObjectsToPackUsingBitmaps( BitmapWalker bitmapWalker, Set<? extends ObjectId> want, Set<? extends ObjectId> have) throws MissingObjectException, IncorrectObjectTypeException, IOException { BitmapBuilder haveBitmap = bitmapWalker.findObjects(have, null, true); BitmapBuilder wantBitmap = bitmapWalker.findObjects(want, haveBitmap, false); BitmapBuilder needBitmap = wantBitmap.andNot(haveBitmap); if (useCachedPacks && reuseSupport != null && !reuseValidate && (excludeInPacks == null || excludeInPacks.length == 0)) cachedPacks.addAll( reuseSupport.getCachedPacksAndUpdate(needBitmap)); for (BitmapObject obj : needBitmap) { ObjectId objectId = obj.getObjectId(); if (exclude(objectId)) { needBitmap.remove(objectId); continue; } filterAndAddObject(objectId, obj.getType(), 0, want); } if (thin) haveObjects = haveBitmap; }
private void findObjectsToPackUsingBitmaps( PackWriterBitmapWalker bitmapWalker, Set<? extends ObjectId> want, Set<? extends ObjectId> have) throws MissingObjectException, IncorrectObjectTypeException, IOException { BitmapBuilder haveBitmap = bitmapWalker.findObjects(have, null, true); bitmapWalker.reset(); BitmapBuilder wantBitmap = bitmapWalker.findObjects(want, haveBitmap, false); BitmapBuilder needBitmap = wantBitmap.andNot(haveBitmap); if (useCachedPacks && reuseSupport != null && !reuseValidate && (excludeInPacks == null || excludeInPacks.length == 0)) cachedPacks.addAll( reuseSupport.getCachedPacksAndUpdate(needBitmap)); for (BitmapObject obj : needBitmap) { ObjectId objectId = obj.getObjectId(); if (exclude(objectId)) { needBitmap.remove(objectId); continue; } addObject(objectId, obj.getType(), 0); } if (thin) haveObjects = haveBitmap; }
RevCommit c; while ((c = walker.next()) != null) { if (exclude(c)) continue; if (c.has(RevFlag.UNINTERESTING)) { RevCommit p = cmit.getParent(i); if (!p.has(added) && !p.has(RevFlag.UNINTERESTING) && !exclude(p)) { p.add(added); addObject(p, 0); if (o.has(RevFlag.UNINTERESTING)) continue; if (exclude(o)) continue; if (o.has(RevFlag.UNINTERESTING)) continue; if (exclude(o)) continue; addObject(o, walker.getPathHashCode());
RevCommit c; while ((c = walker.next()) != null) { if (exclude(c)) continue; if (c.has(RevFlag.UNINTERESTING)) { RevCommit p = cmit.getParent(i); if (!p.has(added) && !p.has(RevFlag.UNINTERESTING) && !exclude(p)) { p.add(added); addObject(p, 0); if (o.has(RevFlag.UNINTERESTING)) continue; if (exclude(o)) continue; if (o.has(RevFlag.UNINTERESTING)) continue; if (exclude(o)) continue; filterAndAddObject(o, o.getType(), walker.getPathHashCode(), want);