Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > Aside: git-update-index(1) says > > Version 4 is relatively young (first released in 1.8.0 in > October 2012). > > My first reaction is to wonder if it is time to introduce a config > option to use index format version 4 by default, since after 5 years > it is not relatively young any more. > > My second reaction is to notice that the index.version configuration > already exists. Probably git-update-index(1) ought to point to it. Both good points. > JGit still doesn't support index format 4, so 4 is still not a good > default for `index.version` for a user that hasn't explicitly > configured it, but the moment JGit gains that support I think it will > be. :) After reading ce_write_entry(), I tend to agree. v4 is the first one that loses the alignment padding, which made sense back when we mmap(2)ed the index file and read from it directly without the ondisk-vs-incore conversion, but that stopped to be the case several years ago. I find it interesting to find that the recently proposed design for reftable uses the same "common prefix compression from the previous name" trick, even though index v4 does not have any resync point like reftable does.