The Iff2de881 tried to fix missing tree ..." but introduced severe
performance degradation (>10x in some cases) when acting as server
(git push) and as client (replication). IOW cure is worse than the
disease.
This reverts commit c4797fe986
.
Change-Id: I4e6056eb352d51277867f857a0cab380eca153ac
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
tags/v3.7.1.201504261725-r
@@ -214,21 +214,6 @@ public class ObjectWalkTest extends RevWalkTestCase { | |||
assertNull(objw.nextObject()); | |||
} | |||
@Test | |||
public void testMarkUninterestingPropagation() throws Exception { | |||
final RevBlob f = blob("1"); | |||
final RevTree t = tree(file("f", f)); | |||
final RevCommit c1 = commit(t); | |||
final RevCommit c2 = commit(t); | |||
markUninteresting(c1); | |||
markStart(c2); | |||
assertSame(c2, objw.next()); | |||
assertNull(objw.next()); | |||
assertNull(objw.nextObject()); | |||
} | |||
@Test | |||
public void testEmptyTreeCorruption() throws Exception { | |||
ObjectId bId = ObjectId |
@@ -232,7 +232,7 @@ public class ObjectWalk extends RevWalk { | |||
} | |||
if (o instanceof RevCommit) | |||
markUninteresting((RevCommit) o); | |||
super.markUninteresting((RevCommit) o); | |||
else if (o instanceof RevTree) | |||
markTreeUninteresting((RevTree) o); | |||
else | |||
@@ -242,18 +242,6 @@ public class ObjectWalk extends RevWalk { | |||
addObject(o); | |||
} | |||
@Override | |||
public void markUninteresting(RevCommit c) throws MissingObjectException, | |||
IncorrectObjectTypeException, IOException { | |||
super.markUninteresting(c); | |||
try { | |||
markTreeUninteresting(c.getTree()); | |||
} catch (MissingObjectException e) { | |||
// we don't care if the tree of the commit does not exist locally | |||
} | |||
} | |||
@Override | |||
public void sort(RevSort s) { | |||
super.sort(s); | |||
boundary = hasRevSort(RevSort.BOUNDARY); |