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

fix(manager/git-submodule): updates when update=none #32455

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

samgiz
Copy link

@samgiz samgiz commented Nov 11, 2024

Changes

Enable updating git submodules that have update=none set in .gitmodules.

Context

When update=none, git submodule update --init doesn't pull that specific submodule. This provides a way to emulate optional dependencies that aren't vital for the repo to work, but the end user still has the option to fetch them by doing git submodule update --init --checkout for extra functionality.

Renovate would fail to successfully initialize such submodules and then fail with submodule checkout error when trying to checkout a specific commit.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@samgiz samgiz marked this pull request as draft November 11, 2024 17:56
@viceice viceice changed the title Fix submodule updates when update=none fix(manager/git-submodule): updates when update=none Nov 11, 2024
@samgiz
Copy link
Author

samgiz commented Nov 11, 2024

Here is a reproducer: https://github.com/samgiz/renovate-reproducer-32455.

@samgiz samgiz marked this pull request as ready for review November 11, 2024 18:26
@samgiz
Copy link
Author

samgiz commented Nov 14, 2024

Is anything stopping this from being merged?

rarkins
rarkins previously approved these changes Nov 16, 2024
auto-merge was automatically disabled November 16, 2024 10:38

Head branch was pushed to by a user without write access

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