aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
diff options
context:
space:
mode:
authorMatt Fischer <matt.fischer@garmin.com>2010-07-26 22:39:37 -0500
committerChris Aniszczyk <zx@twitter.com>2011-08-21 14:04:23 -0700
commit9952223e0645fd7a8cddc6093a7f449c6390238d (patch)
treec00454ab2a6e13da6a65dbd28828aab01b509912 /org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
parenta1a8c6d77ec5bea13c4f5ca428e425d95e14e003 (diff)
downloadjgit-9952223e0645fd7a8cddc6093a7f449c6390238d.tar.gz
jgit-9952223e0645fd7a8cddc6093a7f449c6390238d.zip
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 <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java20
1 files changed, 13 insertions, 7 deletions
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) {