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 checkout-error for nested shallow submodules #380

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccwienk
Copy link

@ccwienk ccwienk commented Mar 29, 2022

If a nested submodule is configured to be "shallow", referencing a
commit that is not reachable from the respective repository's HEAD
(typically the default branch, if e.g. hosted on GitHub), will result in
an error when checking out the submodule (git submodule update..).

Workaround this by always setting --no-recommend-shallow, which
lets git ignore this setting.

For a "real-world" example, see: google/docsy#755 (I also commented there)

If a nested submodule is configured to be "shallow", referencing a
commit that is not reachable from the respective repository's HEAD
(typically the default branch, if e.g. hosted on GitHub), will result in
an error when checking out the submodule (git submodule update..).

Workaround this by always setting `--no-recommend-shallow`, which
lets git ignore this setting.
@xtremerui
Copy link
Contributor

My knowledge with git shallow clone is limited. Would adding this flag cause users cloning more data than they want (if their submodules is meant to be shallow)?

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.

None yet

3 participants