From: Dave Borowitz Date: Thu, 12 Jun 2014 19:01:48 +0000 (-0700) Subject: Don't set REWRITE flag unless parent rewriting is requested X-Git-Tag: v3.5.0.201409071800-rc1~98 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7eb0b702fdcbf82ed540c21c37e1e2b441daf09e;p=jgit.git Don't set REWRITE flag unless parent rewriting is requested Change-Id: I65e3702ceb6c8854a2c358cfc2c2e3a9fb9486ff --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java index aab678cd7b..593e09e255 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java @@ -127,11 +127,13 @@ class StartGenerator extends Generator { else pending = new DateRevQueue(q); if (tf != TreeFilter.ALL) { - rf = AndRevFilter.create( - new TreeRevFilter(w, tf, RevWalk.REWRITE), rf); - pendingOutputType |= HAS_REWRITE; - if (w.getRewriteParents()) - pendingOutputType |= NEEDS_REWRITE; + int rewriteFlag; + if (w.getRewriteParents()) { + pendingOutputType |= HAS_REWRITE | NEEDS_REWRITE; + rewriteFlag = RevWalk.REWRITE; + } else + rewriteFlag = 0; + rf = AndRevFilter.create(new TreeRevFilter(w, tf, rewriteFlag), rf); } walker.queue = q;