4 ms·
Why are there multiple main() functions? I've never seen this style before. Is it multi-process?
by zabcik 12y ago
Why are there multiple main() functions? I've never seen this style before. Is it multi-process?
- GauntletWizard 12y agoThere's a bunch of different utilities in there. Each has it's own main() function, and they're compiled into a bunch of binaries.
- taurath 12y agoCould just be initializers for different modules maybe?
- Svenstaro 12y agoThere are multiple main() functions because there are multiple programs! Check out https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23ca2e25604af290#diff-b67911656ef5d18c4ae36cb6741b7965R4 https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23...
- andrewchambers 12y agoLook at the makefile, it just has a command line program for each basic operation.