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

feat: Ensure non-shallow submodules #2

Merged
merged 1 commit into from
May 8, 2024

Conversation

Muscraft
Copy link
Contributor

@Muscraft Muscraft commented May 7, 2024

rust-lang/rust switched to shallow clones for submodules and it started causing problems with subup. The two I have encountered are:

  1. When updating the cargo submodule, the PR description it would create would not include all of the correct commit, but they would be in the actual commit
    • This is likely due to the shallow clone not including all of the required info
  2. When doing a beta backport of the cargo submodule, it would fail as it couldn't find the revision
    Status: Checking submodule revs.
    fatal: Needed a single revision
    fatal: Needed a single revision
    Error: Failed to determine rev `rust-1.79.0` for path `src/tools/cargo`
    Caused by: Failed to run command: git rev-parse --verify rust-1.79.0
    Caused by: Command exit status Some(128)
    

After much testing, it appears both of these are caused by shallow clones and can be fixed by unshallowing the submodules. One way to do this is to use git fetch --unshallow, which is the approach I took in this PR. One thing to note with --unshallow is it can only be run on shallow clones.

Copy link
Owner

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks!

cc @weihanglo FYI

@ehuss ehuss merged commit 8a9bc18 into ehuss:master May 8, 2024
@Muscraft Muscraft deleted the ensure-unshallow branch May 9, 2024 00:28
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.

2 participants