Re: [JGIT PATCH 00/10] Support writing pack index version 2
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jun 25, 2008, 03:54 UTC
- Message-ID
- <20080625035409.GY11793@spearce.org>
- In-Reply-To
- <200806250048.29892.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> > Ocular review looks fine, but nevertheless some tests break.
Dammit.
> org.spearce.jgit.lib.PackIndexV2Test > testIteratorMethodsContract(org.spearce.jgit.lib.PackIndexV2Test) > java.io.IOException: Unreadable pack index: /home/me/SW/EGIT.contrib/org.spearce.jgit.test/tst/pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.idxV2 > at org.spearce.jgit.lib.PackIndex.open(PackIndex.java:95)
...
> at org.spearce.jgit.lib.PackIndexV1.<init>(PackIndexV1.java:75)
Yea, OK, I know what that is. I busted PackIndex.isTOC.
I asked it to compare a 4 byte array (TOC only) to an 8 byte array (TOC + version) and of course 4 != 8 so it fails. Thus all V2 index files look like V1 files. Only they aren't; and then all hell breaks loose when we start treating parts of the V2 index as different sections of the V1 index.
I'll post a replacement patch in a minute.
> Together with Marek's packwrite patches the list gets even longer (his patches alone are "green"). I'm > not including them here.
That's because Marek's branch includes additional tests for features he added to PackIndexV2. But all PackIndexV2 reading is busted.
-- Shawn.