pw.setShallowPack(req.getDepth(), unshallowCommits); DepthWalk.RevWalk dw = new DepthWalk.RevWalk( walk.getObjectReader(), walkDepth); dw.setDeepenSince(req.getDeepenSince()); dw.setDeepenNots(deepenNots); dw.assumeShallow(req.getClientShallowCommits()); rw = dw;
try (DepthWalk.RevWalk depthWalk = new DepthWalk.RevWalk( walk.getObjectReader(), walkDepth)) { depthWalk.setDeepenSince(req.getDeepenSince()); depthWalk.markRoot(depthWalk.parseCommit(o)); } catch (IncorrectObjectTypeException notCommit) { depthWalk.setDeepenNots(deepenNots); while ((o = depthWalk.next()) != null) { DepthWalk.Commit c = (DepthWalk.Commit) o; atLeastOne = true;
/** * @param repo Repository to walk * @param depth Maximum depth to return */ public RevWalk(Repository repo, int depth) { super(repo); this.depth = depth; this.deepenNots = Collections.emptyList(); this.UNSHALLOW = newFlag("UNSHALLOW"); //$NON-NLS-1$ this.REINTERESTING = newFlag("REINTERESTING"); //$NON-NLS-1$ this.DEEPEN_NOT = newFlag("DEEPEN_NOT"); //$NON-NLS-1$ }
pw.setShallowPack(req.getDepth(), unshallowCommits); DepthWalk.RevWalk dw = new DepthWalk.RevWalk( walk.getObjectReader(), walkDepth); dw.setDeepenSince(req.getDeepenSince()); dw.setDeepenNots(deepenNots); dw.assumeShallow(req.getClientShallowCommits()); rw = dw;
if (depth > 0) { pw.setShallowPack(depth, unshallowCommits); rw = new DepthWalk.RevWalk(walk.getObjectReader(), depth - 1); rw.assumeShallow(clientShallowCommits);
try (DepthWalk.RevWalk depthWalk = new DepthWalk.RevWalk( walk.getObjectReader(), walkDepth)) { depthWalk.setDeepenSince(req.getDeepenSince()); depthWalk.markRoot(depthWalk.parseCommit(o)); } catch (IncorrectObjectTypeException notCommit) { depthWalk.setDeepenNots(deepenNots); while ((o = depthWalk.next()) != null) { DepthWalk.Commit c = (DepthWalk.Commit) o; atLeastOne = true;
public Optional<Integer> distanceTo(ObjectId target) { DepthWalk.RevWalk walk = null; try { walk = new DepthWalk.RevWalk(repository, maxDepth); RevCommit startCommit = walk.parseCommit(startId); walk.markRoot(startCommit); walk.setRetainBody(false); Iterator<? extends RevCommit> commitIterator = walk.iterator(); } finally { if (walk != null) { walk.dispose(); walk.close();
private void processShallow() throws IOException { int walkDepth = depth - 1; try (DepthWalk.RevWalk depthWalk = new DepthWalk.RevWalk( walk.getObjectReader(), walkDepth)) { depthWalk.markRoot(depthWalk.parseCommit(o)); } catch (IncorrectObjectTypeException notCommit) { while ((o = depthWalk.next()) != null) { DepthWalk.Commit c = (DepthWalk.Commit) o;
/** * @param repo Repository to walk * @param depth Maximum depth to return */ public RevWalk(Repository repo, int depth) { super(repo); this.depth = depth; this.deepenNots = Collections.emptyList(); this.UNSHALLOW = newFlag("UNSHALLOW"); //$NON-NLS-1$ this.REINTERESTING = newFlag("REINTERESTING"); //$NON-NLS-1$ this.DEEPEN_NOT = newFlag("DEEPEN_NOT"); //$NON-NLS-1$ }
/** * @param or ObjectReader to use * @param depth Maximum depth to return */ public RevWalk(ObjectReader or, int depth) { super(or); this.depth = depth; this.deepenNots = Collections.emptyList(); this.UNSHALLOW = newFlag("UNSHALLOW"); //$NON-NLS-1$ this.REINTERESTING = newFlag("REINTERESTING"); //$NON-NLS-1$ this.DEEPEN_NOT = newFlag("DEEPEN_NOT"); //$NON-NLS-1$ }
/** * @param or ObjectReader to use * @param depth Maximum depth to return */ public RevWalk(ObjectReader or, int depth) { super(or); this.depth = depth; this.deepenNots = Collections.emptyList(); this.UNSHALLOW = newFlag("UNSHALLOW"); //$NON-NLS-1$ this.REINTERESTING = newFlag("REINTERESTING"); //$NON-NLS-1$ this.DEEPEN_NOT = newFlag("DEEPEN_NOT"); //$NON-NLS-1$ }