Don't set REWRITE flag unless parent rewriting is requested

Change-Id: I65e3702ceb6c8854a2c358cfc2c2e3a9fb9486ff
This commit is contained in:
Dave Borowitz 2014-06-12 12:01:48 -07:00
parent eb69cef35c
commit 7eb0b702fd
1 changed files with 7 additions and 5 deletions

View File

@ -127,11 +127,13 @@ RevCommit next() throws MissingObjectException,
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;