Closed lanthaler closed 9 years ago
This is an interesting idea.
First of all, though, please note that this is not specific to the Windows port of Git, so you probably want to take it to the Git mailing list: git@vger.kernel.org.
I cannot resist throwing one comment out, though: Generating a .zip
file is not exactly cheap, and updating a .zip
file is almost as expensive as generating a new one because the file format was never designed to serve as a file system (i.e. allow easy removal/addition of data). Therefore, I am pretty certain that the price to pay would be a pretty hefty performance penalty (read: Git would become slower than it is right now).
So I am closing this here and ask you to send your proposal upstream.
OK, fair enough. The reason I asked here is because having to deal with thousands of files is especially painful on Windows. I mentioned ZIP because there exist libraries which would be quite easy to integrate and it would be trivial to expand it again to a "real" Git repo - apart from that I'd be fine with whatever format works best.
The reason I asked here is because having to deal with thousands of files is especially painful on Windows.
That is true, but you're not supposed to manage those files yourself. The occasional auto-gc should clean things up enough to provide decent performance: after enough individual files have accumulated, they are combined into a "pack" (this is oversimplified, of course, but gets the point across better than a detailed description of Git's internals).
you can set config gc.auto
I just wondered whether it would be worthwhile to consider replacing the .git folder with the bazillion files in it with a virtual folder stored in a single ZIP file. This would make most file operations on Windows much faster but would of course increase complexity. Has something like this being considered?