summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
index 94156aa7e4..d6063c31b4 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
@@ -211,11 +211,15 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
}
protected RevWalk createWalk() {
+ RevWalk result;
if (objects)
- return new ObjectWalk(db);
- if (argWalk != null)
- return argWalk;
- return argWalk = new RevWalk(db);
+ result = new ObjectWalk(db);
+ else if (argWalk != null)
+ result = argWalk;
+ else
+ result = argWalk = new RevWalk(db);
+ result.setRewriteParents(false);
+ return result;
}
protected int walkLoop() throws Exception {