From 9952223e0645fd7a8cddc6093a7f449c6390238d Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Mon, 26 Jul 2010 22:39:37 -0500 Subject: Implement server support for shallow clones This implements the server side of shallow clones only (i.e. git-upload-pack), not the client side. CQ: 5517 Bug: 301627 Change-Id: Ied5f501f9c8d1fe90ab2ba44fac5fa67ed0035a4 Signed-off-by: Chris Aniszczyk --- .../src/org/eclipse/jgit/revwalk/StartGenerator.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java') diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java index fbff027784..7fb958bbb6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java @@ -132,14 +132,20 @@ class StartGenerator extends Generator { } walker.queue = q; - g = new PendingGenerator(w, pending, rf, pendingOutputType); - if (boundary) { - // Because the boundary generator may produce uninteresting - // commits we cannot allow the pending generator to dispose - // of them early. - // - ((PendingGenerator) g).canDispose = false; + if (walker instanceof DepthWalk) { + DepthWalk dw = (DepthWalk) walker; + g = new DepthGenerator(dw, pending); + } else { + g = new PendingGenerator(w, pending, rf, pendingOutputType); + + if (boundary) { + // Because the boundary generator may produce uninteresting + // commits we cannot allow the pending generator to dispose + // of them early. + // + ((PendingGenerator) g).canDispose = false; + } } if ((g.outputType() & NEEDS_REWRITE) != 0) { -- cgit v1.2.3