On Tue, Feb 7, 2012 at 11:50 AM, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote: >> Version 3 was a mistake because of the variable length record sizes. >> Saving 2 bytes on some records that don't use the extended flags makes >> the index file *MUCH* harder to parse. So much so that we should take >> version 3 and kill it, not encourage it as the default! > > Probably too late for that, but it's good to know there are strong > user base for v2. OK probably not too late. We cannot kill it, but we could deprecate it. We can introduce a mandatory extension to store extra flags. The extension is basically an array of struct ce_extended_flags { int ce_index; /* points to istate->cache[ce_index] */ unsigned long flags; }; On reading the extension, extra flags is applied back in mem, the extension is created again when new index is written. There are only two users of index v3: skip-worktree and intent-to-add bits, which are not used often, I think. Still want to kill it? Switching from sha-1 to crc32 could be done the same way (i.e. new mandatory extension _at the end_ that contains crc32 checksum and skip sha-1 check on reading if it's all zero) if we agree to move to crc32. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html