aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2014-05-05 15:21:16 -0700
committerDave Borowitz <dborowitz@google.com>2014-05-05 16:41:13 -0700
commit99008648d176c04842f8ccb99177579d0cbe89a0 (patch)
treefadc613f9035c8af132b43de36b159b959b8ea10
parentdbf922ce91c2bcde8b4604cc2a4ed8ecf8de54f4 (diff)
downloadjgit-99008648d176c04842f8ccb99177579d0cbe89a0.tar.gz
jgit-99008648d176c04842f8ccb99177579d0cbe89a0.zip
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
-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 {