-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(submodules): cloneSubmodules option #7498
Conversation
This includes a couple of changes: - Added a new boolean config option cloneSubmodules (Defaults to `true` to be a non-breaking change) - Update submodules using `checkout` instead of `submdoule update --remote` - Remove usage of simple-git `silent()` as it's deprecated I wasn't able update a submodule using `update-index` and put the change in 'Changes not staged for commit'. I'm open to suggestions here. I have however changed the call from `git submodule update --init --remote` to a simple `git checkout`. The `--remote` flag updates the submodule to the latest commit at the remote, so there was a (very small chance) of a race condition here Closes #7472
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs deconflicting, other LGTM. assuming you've done a lot real testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we split these into separate PRs in case one part doesn't work?
@@ -106,7 +106,8 @@ export default async function extractPackageFile( | |||
try { | |||
const [currentValue] = (await git.subModule(['status', path])) | |||
.trim() | |||
.split(/[+\s]/); | |||
.replace(/^[-+]/, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this fixing any open issue or just something you discovered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't an open issue for this, but it does fix a bug
@JamieMagee lets split this pr. |
Okay, will create new PRs, and abandon this one. |
This is part 1 of #7498, and includes: - Added a new boolean config option cloneSubmodules (Defaults to `true` to be a non-breaking change)
This is part 3 of #7498, and includes: - Correctly parse git submodule name
This is part 3 of #7498, and includes: - Correctly parse git submodule name
This is part 3 of #7498, and includes: - Correctly parse git submodule name
This includes a couple of changes:
true
to be a non-breaking change)checkout
instead ofsubmdoule update --remote
silent()
as it's deprecatedI wasn't able update a submodule using
update-index
and put the change in 'Changes not staged for commit'. I'm open to suggestions here. I have however changed the call fromgit submodule update --init --remote
to a simplegit checkout
. The--remote
flag updates the submodule to the latest commit at the remote, so there was a (very small chance) of a race condition hereCloses #7472