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 94156aa7e..d6063c31b 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 {