Browse Source

Don't set REWRITE flag unless parent rewriting is requested

Change-Id: I65e3702ceb6c8854a2c358cfc2c2e3a9fb9486ff
stable-3.5
Dave Borowitz 11 years ago
parent
commit
7eb0b702fd
  1. 12
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java

12
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java

@ -127,11 +127,13 @@ class StartGenerator extends Generator {
else else
pending = new DateRevQueue(q); pending = new DateRevQueue(q);
if (tf != TreeFilter.ALL) { if (tf != TreeFilter.ALL) {
rf = AndRevFilter.create( int rewriteFlag;
new TreeRevFilter(w, tf, RevWalk.REWRITE), rf); if (w.getRewriteParents()) {
pendingOutputType |= HAS_REWRITE; pendingOutputType |= HAS_REWRITE | NEEDS_REWRITE;
if (w.getRewriteParents()) rewriteFlag = RevWalk.REWRITE;
pendingOutputType |= NEEDS_REWRITE; } else
rewriteFlag = 0;
rf = AndRevFilter.create(new TreeRevFilter(w, tf, rewriteFlag), rf);
} }
walker.queue = q; walker.queue = q;

Loading…
Cancel
Save