Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zabcik
on Nov 24, 2014
|
parent
|
context
|
favorite
| on:
Git's initial commit
Why are there multiple main() functions? I've never seen this style before. Is it multi-process?
GauntletWizard
on Nov 24, 2014
|
next
[–]
There's a bunch of different utilities in there. Each has it's own main() function, and they're compiled into a bunch of binaries.
Svenstaro
on Nov 24, 2014
|
prev
|
next
[–]
There are multiple main() functions because there are multiple programs! Check out
https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23...
andrewchambers
on Nov 24, 2014
|
prev
|
next
[–]
Look at the makefile, it just has a command line program for each basic operation.
taurath
on Nov 24, 2014
|
prev
[–]
Could just be initializers for different modules maybe?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: