3 ms·
I don't understand where git's distributed nature comes into play here. Perforce is fully centralized, and it also doesn't have any limits to repo size - as lon
by tsimionescu 4y ago
I don't understand where git's distributed nature comes into play here. Perforce is fully centralized, and it also doesn't have any limits to repo size - as long as you have enough disk, P4 will handle it.
In fact, Git's distributed nature actually makes it infamously bad at scaling with repo size - since it requires every "participant" in a repo to have a copy of the entire repo before they can start any work on it.
- dblitt 4y agoThis is where something like VFSForGit [0] helps out. Instead of cloning the entire repo, it creates a virtual file system and fetches objects on demand. MSFT uses it internally for the Windows source tree (which now exceeds 300GB). [0]: https://github.com/microsoft/VFSForGit https://github.com/microsoft/VFSForGit
- btown 4y agoVFSForGit seems to be in maintenance mode now - do you know what it was replaced by, and if there's something that works cross-platform?
- AaronFriel 4y agoIt was replaced by Scalar and is now merged into Git: Introduced: https://devblogs.microsoft.com/devops/introducing-scalar/ https://devblogs.microsoft.com/devops/introducing-scalar/ Integration into Git: https://github.blog/2022-10-13-the-story-of-scalar/ https://github.blog/2022-10-13-the-story-of-scalar/
- rvbissell 4y agoShallow cloning of Git repos is a thing. Basically, you get a fake head commit (that includes all the files) and none of the real history. Useful if you only intend to build, or make changes locally. If you want to push, you have to unshallow first.
- someguy101010 4y agowould be cool to be able to commit without unshallowing first
- phil-m 4y agoNot possible, due to the way how git works: It's a merkle tree of commits, where each of these commits point to a file tree (content-addressed by the hash) and the previous commit
- iudqnolq 4y agoNo, creating a git commit merely requires knowing the current state of all the files and the hash of the previous commit. You don't need the actual contents of the previous commits. https://git-scm.com/book/en/v2/Git-Internals-Git-Objects https://git-scm.com/book/en/v2/Git-Internals-Git-Objects Pushing from a shallow clone to a remote is more complex, but is supported in modern git versions. https://stackoverflow.com/a/6900428 https://stackoverflow.com/a/6900428