Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> git submodule update --init --recursive

nope. this looks cool, but Git submodules are cursed



I think you mean recursed


What's a better option for linking 3rd party code?


Is this a joke? Go has built in support for importing 3rd party code


Go has built-in support for importing Go modules, but the submodule is for a C++ library not a Go module, so your suggestion isn't workable.


Dip it in a blessed clear potion.


Why?


Poor integration, mostly.

It’s fairly easy to get into an irrecoverably broken state using an intermediate-level Git operation such as an interactive rebase (as of a couple of years ago). (It’s probably recoverable by reaching into the guts of the repo, but given you can’t do the rebase either way I’m still taking off a point.) The distinguished remote URLs thing is pointlessly awkward—I’ve never gotten pushing to places where those remotes are inaccessible to work properly when the pushed commit updates the submodule reference. (I believe it’s possible, but given the amount of effort I’ve put into unsuccessfully figuring that out, I’m comfortable taking off a point here as well.)

I like git submodules, I think they’re fundamentally the right way to do things. But despite their age they aren’t in what I’d call a properly working state, even compared to Git’s usual amount of sharp edges.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: