From 99008648d176c04842f8ccb99177579d0cbe89a0 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Mon, 5 May 2014 15:21:16 -0700 Subject: Do not rewrite parents in RevWalkTextBuiltins Default behavior of C git is to skip parent rewriting unless particular history simplification or --parents flags are passed. Since JGit has no such flags, JGit should not rewrite parents. Change-Id: I9ba0e70fe6d5f49f975b71eea46f93198900f37d --- .../src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit') 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 { -- cgit v1.2.3