straight.el
straight.el copied to clipboard
Repository management commands don't work with submodules
Whenever I pull straight, I get this:

Not hard to fix manually, but a bit annoying. Does look like straight doesn't play too well with submodules?
Yes, looking at the merge handling it doesn't look like there's any code to account for submodules. It would be a very welcome addition.
I've never really used git submodules, so I'm not entirely sure what the best approach would be.
Would running git submodule update after merge if .gitmodules is present in the repository be an acceptable handling?
Sorry, I don't have extensive experience with submodules either. However I think we would want to use flags
git submodule update --init --recursive
and you don't have to check if .gitmodules exists (the command is a no-op if it doesn't).
I think submodules have to be updated every time we perform a checkout or reset of any sort, honestly. It may therefore make sense to abstract the code into a function that can be called all over the place.
´´´ git submodule update --init --recursive ´´´
:+1:
and you don't have to check if .gitmodules exists (the command is a no-op if it doesn't).
Well, I think checking for a file to save a process invocation is worth it.
I think submodules have to be updated every time we perform a checkout or reset of any sort, honestly. It may therefore make sense to abstract the code into a function that can be called all over the place.
Agreed.
Well, I think checking for a file to save a process invocation is worth it.
If you want to, I have no objections, but this is not performance-critical code since it's part of repository management. (On the contrary, anything that's run during startup would be very much subject to this sort of optimization.)