Skip to content
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

Workaround for submodules failing #5222

Merged
merged 3 commits into from
Oct 6, 2019
Merged

Workaround for submodules failing #5222

merged 3 commits into from
Oct 6, 2019

Conversation

tresf
Copy link
Member

@tresf tresf commented Oct 5, 2019

As discovered by @PhysSong, git version 2.7.4 -- the default for Ubuntu 16.04 -- has a bug where it doesn't properly honor the deinit call, nor the --depth 2147483647 hack that was previously provided in #5182 as a workaround to the ECM nested submodule failing during shallow clone.

This works around that bug by using a trick @PhysSong found, delete the .git/modules/<path>, then call deinit, then do the --depth 2147483647 hack.

The advantage this has over just forcing full clones for older git versions is it fixes the issue reactively for offending submodules (e.g. ECM) without doing full clones for everything (e.g. the huge CalfStudioGear submodule).

@tresf tresf requested review from Reflexe and PhysSong October 5, 2019 04:37
@LmmsBot
Copy link

LmmsBot commented Oct 5, 2019

Downloads for this pull request

Generated by the LMMS pull requests bot.
SHA: 46e80c0

@PhysSong
Copy link
Member

PhysSong commented Oct 5, 2019

Fix confirmed, but I recommend deleting the directory after deinitialization. I can't deinitialize the submodule without -f if I remove the directory before the deinitialization.

I put my thing down, flip it and reverse it
@tresf
Copy link
Member Author

tresf commented Oct 6, 2019

Missy Elliott has flipped it and reverse it. Tested on 16.04 and it seems to work.

Copy link
Member

@PhysSong PhysSong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Could you rebase to squash the first commit and the last commit before merging while leaving the second commit as-is?

@tresf
Copy link
Member Author

tresf commented Oct 6, 2019

Good. Could you rebase to squash the first commit and the last commit before merging while leaving the second commit as-is?

I refuse to rebase to such microscopic detail. If you want to, go ahead.

@tresf
Copy link
Member Author

tresf commented Oct 6, 2019

Per Discord:

I wanted to decouple the bug fix and enhancement, but I'm okay with squashing everything.

@tresf tresf merged commit da09b2a into LMMS:master Oct 6, 2019
@tresf tresf deleted the sub branch October 6, 2019 05:05
@PhysSong
Copy link
Member

PhysSong commented Feb 3, 2020

I found that --depth 2147483647 breaks a nested submodule which points to a non-default branch. I have an idea of how to fix this, but I need to make sure it doesn't break anything that worked previously.

sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
Workaround git's inability to recover from a shallow clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants