git-resource icon indicating copy to clipboard operation
git-resource copied to clipboard

workaround checkout-error for nested shallow submodules

Open ccwienk opened this issue 3 years ago • 1 comments

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: https://github.com/google/docsy/issues/755 (I also commented there)

ccwienk avatar Mar 29 '22 12:03 ccwienk

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)?

xtremerui avatar Mar 31 '22 19:03 xtremerui