diff options
author | Dave Borowitz <dborowitz@google.com> | 2014-06-12 12:01:48 -0700 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2014-06-12 13:52:09 -0700 |
commit | 7eb0b702fdcbf82ed540c21c37e1e2b441daf09e (patch) | |
tree | 341fc78253111035b9d0c96ababf048a1c13e579 /org.eclipse.jgit | |
parent | eb69cef35c2fa9d6f1f8493e3ae03cd65b86b5cc (diff) | |
download | jgit-7eb0b702fdcbf82ed540c21c37e1e2b441daf09e.tar.gz jgit-7eb0b702fdcbf82ed540c21c37e1e2b441daf09e.zip |
Don't set REWRITE flag unless parent rewriting is requested
Change-Id: I65e3702ceb6c8854a2c358cfc2c2e3a9fb9486ff
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java | 12 |
1 files changed, 7 insertions, 5 deletions
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; |