Browse Source

Merge branch 'stable-3.7'

* stable-3.7:
  Prepare 3.7.2-SNAPSHOT builds
  JGit v3.7.1.201504261725-r
  Revert "Let ObjectWalk.markUninteresting also mark the root tree as"

Change-Id: If1b62ff695e063d797c3d13c43e488ca56f29cbe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.1
Matthias Sohn 10 years ago
parent
commit
65423ea1b1
  1. 15
      org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ObjectWalkTest.java
  2. 14
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java

15
org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ObjectWalkTest.java

@ -214,21 +214,6 @@ public class ObjectWalkTest extends RevWalkTestCase {
assertNull(objw.nextObject()); 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 @Test
public void testEmptyTreeCorruption() throws Exception { public void testEmptyTreeCorruption() throws Exception {
ObjectId bId = ObjectId ObjectId bId = ObjectId

14
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java

@ -232,7 +232,7 @@ public class ObjectWalk extends RevWalk {
} }
if (o instanceof RevCommit) if (o instanceof RevCommit)
markUninteresting((RevCommit) o); super.markUninteresting((RevCommit) o);
else if (o instanceof RevTree) else if (o instanceof RevTree)
markTreeUninteresting((RevTree) o); markTreeUninteresting((RevTree) o);
else else
@ -242,18 +242,6 @@ public class ObjectWalk extends RevWalk {
addObject(o); 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) { public void sort(RevSort s) {
super.sort(s); super.sort(s);
boundary = hasRevSort(RevSort.BOUNDARY); boundary = hasRevSort(RevSort.BOUNDARY);

Loading…
Cancel
Save