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
tags/v3.4.0.201405211411-rc1
Dave Borowitz 10 years ago
parent
commit
99008648d1

+ 8
- 4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java View File

@@ -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 {

Loading…
Cancel
Save