On Wed, Mar 21, 2012 at 6:08 PM, Thomas Gummerer <t.gummerer@xxxxxxxxx> wrote: >> > However I got one more question, since I'm not yet really familiar with >> > the >> > code and internal structure of git, what exactly does the SHA1 over the >> > index exactly achieve? Is it only for checking if the index is still >> > correct >> > for the next time it is used and has not been changed or is there a more >> > important function of it? >> >> It makes sure the index is not corrupt (by disk faults for example). I >> don't think it is used for anything else. Cheaper checksum can be used >> if good enough for the index. See >> http://thread.gmane.org/gmane.comp.version-control.git/190016 and the >> following reply. > > Ok thanks. I guess that could be another way to speed things up, but for > really big repositories probably it won't be enough and the reduction of the > complexity as described in the proposal is the way to go. Yeah. A good format should not require checksuming the whole index, if we only need to read/verify a few entries, I think. > Is the current complexity O(n)? I think so. Have a look at read-cache.c, read_index_from for reading and write_index for writing, as a starting point. -- 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