diff options
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java | 6 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java index c422234088..5154920393 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java @@ -208,10 +208,14 @@ class DepthGenerator extends Generator { !p.has(DEEPEN_NOT)) { pending.add(p); } else { - c.isBoundary = true; + dp.makesChildBoundary = true; } } + if (dp.makesChildBoundary) { + c.isBoundary = true; + } + // If the current commit has become unshallowed, everything // below us is new to the client. Mark its parent as // re-interesting, and carry that flag downward to all diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java index 66e8497a12..2eca12be52 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java @@ -112,14 +112,20 @@ public interface DepthWalk { boolean isBoundary; + /** + * True if this commit was excluded due to a shallow fetch + * setting. All its children are thus boundary commits. + */ + boolean makesChildBoundary; + /** @return depth of this commit, as found by the shortest path. */ public int getDepth() { return depth; } /** - * @return true if at least one of this commit's children was excluded - * due to a depth or shallow-since restriction, false otherwise + * @return true if at least one of this commit's parents was excluded + * due to a shallow fetch setting, false otherwise * @since 5.2 */ public boolean isBoundary() { |