3 ms·
I know nothing of the code Facebook is hosting, but one fairly obvious general benefit of having things in a single repository is that you can use relative path
by georgemcbay 13y ago
I know nothing of the code Facebook is hosting, but one fairly obvious general benefit of having things in a single repository is that you can use relative paths to link dependent projects, like if you have a directory structure such as:
libs
libs/mylib
apps
apps/myapp
then myapp can reference library mylib via ../../libs/mylib
If all of these things are in separate repositories, all bets are off about how their paths relate to each other on the local filesystem, resulting in more complicated build procedures.
- markcampbell 13y agoThere's a solution to this. Git submodules.
- bostik 13y agoPlease tell me if there's a way to make git-grep (or git-log for that matter) work between submodules. While I may not personally like behemoth repositories, I do see why people would choose to endure them. They do have their advantages, even if they all eventually end up looking something like BSD ports. (FYI: I happen to like the extremely modular one-git-repo-per-component approach as used in Mer. Hell, I did an early implementation of the OBS+git -based autobuild system back in 2009!)
- nilved 13y agogit submodules don't fix anything except maybe a good day.
- garenp 13y agoSometimes the cure is worse than the disease.
- breck 13y agoYou can still have the benefits of relative links without a single repo if you create a dir at the root level. For example, you can have a /facebook/ dir on every machine with the source, and all your subprojects can assume they are working off that, ie: include /facebook/somemodule