-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update submodules and do recursive clone #123
base: main
Are you sure you want to change the base?
Conversation
Have you thought about adding Also any chance of adding a test? I've got a love-hate relationship with submodules, they're great when they work, incredibly frustrating when there's a change, so I think a test would be useful to ensure we don't modify a git option somewhere in future and inadvertently break it. |
I would support this being merged. Anything I can do to help unblock? |
@jacobtomlinson mostly I'm not sure how the merging functionality would work for files inside the submodules. Will it preserve current automerge behavior? Probably not, so we should very clearly document that. A test is also needed, along with resolving the merge conflict. |
Naively I assumed the same merging behaviour would still apply. What makes you think it should behave differently? |
git submodules just contain a pointer to a repo + ref to check out. So any merging behavior will only refer to those two pieces of information, and nothing more. So if the ref had changed because the user committed something inside the submodule, and the upstream has too, the merging behavior will work out to simply preserving the user's commit - no merging will happen. To do proper merging, we'll have to recursively dive into each submodule and do our merging there too. |
Ah right I see what you mean. Yeah that's kinda what I meant, the merging logic would be the same but it would need to be performed recursively on submodules. Perhaps the pointer itself makes this trickier. |
Yeah, you'd have to do nbgitpuller/nbgitpuller/pull.py Line 189 in 22e2e27
|
This will not cover all edge cases like changes in the submodules.
But we have it in production for over a year now and are happy with it.