Jakub Narebski <jnareb@xxxxxxxxx> wrote: > Shawn O. Pearce wrote: > > > - Assigning repository-wide revision numbers. Git doesn't have > > such a concept, but its key to SVN. These would need to be stored > > in a file so the server can quickly map from revision number to > > Git commit SHA-1. The reflogs may help here, but currently they > > also expire. Any reflog that is being used to do this mapping > > cannot be expired, ever. > > Another idea is to use lightweight tags for that, especially now > with packed refs support in git. Yes, not a bad idea. Except the packed refs file can have variable sized records. It has no faster access path than to just scan it. Some SVN repositories have revision counts up into the 5 and 6 digits. These would take quite a while to scan, even as packed refs. ;-) I'm inclined to lean towards a really simple binary flat file holding just 20 byte SHA-1s, in "SVN order". Then its just a simple array index operation to locate the correct Git commit. And adding a new commit is really just an append to the end operation. Yea, I know, append == bad on some older Linux systems, and is hard to roll back if you partially appended as it gets into some possible nasty mess with truncate, but I think that when combined with a simple lock file we can make it safe enough that its not really going to be a problem. -- Shawn. - 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