Change RevWalkTestCase to use RevCommit, not ObjectId
commitdda57872f5ba44950ccda5c6fab443453574c940
authorShawn O. Pearce <spearce@spearce.org>
Wed, 18 Mar 2009 01:40:42 +0000 (17 18:40 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 19 Mar 2009 20:05:12 +0000 (19 21:05 +0100)
treeab48f3e31bfee513452f649a4d56ef547ee35a11
parent29f296ea72df120a53f8ecea60253c355531875b
Change RevWalkTestCase to use RevCommit, not ObjectId

We build a RevWalk once per test, and only execute a single traversal
in that test run.  Its more clear to use the RevCommit type from that
object pool to represent a commit entity than the generic ObjectId.

When creating a new commit we allocate its RevCommit from the pool,
but we delay parsing until as late as necessary.  This is needed for
at least one test where it validates whether or not the parents of a
commit were allocated after traversal finishes.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit.test/tst/org/spearce/jgit/revwalk/RevWalkCullTest.java
org.spearce.jgit.test/tst/org/spearce/jgit/revwalk/RevWalkFilterTest.java
org.spearce.jgit.test/tst/org/spearce/jgit/revwalk/RevWalkMergeBaseTest.java
org.spearce.jgit.test/tst/org/spearce/jgit/revwalk/RevWalkSortTest.java
org.spearce.jgit.test/tst/org/spearce/jgit/revwalk/RevWalkTestCase.java