Browse Source

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
stable-3.4
Dave Borowitz 11 years ago
parent
commit
99008648d1
  1. 12
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java

12
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java

@ -211,11 +211,15 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
} }
protected RevWalk createWalk() { protected RevWalk createWalk() {
RevWalk result;
if (objects) if (objects)
return new ObjectWalk(db); result = new ObjectWalk(db);
if (argWalk != null) else if (argWalk != null)
return argWalk; result = argWalk;
return argWalk = new RevWalk(db); else
result = argWalk = new RevWalk(db);
result.setRewriteParents(false);
return result;
} }
protected int walkLoop() throws Exception { protected int walkLoop() throws Exception {

Loading…
Cancel
Save