-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow configuration of submodule.fetchJobs and fetch.parallel #1569
base: main
Are you sure you want to change the base?
Conversation
fi | ||
|
||
echo "Testing fetchJobs exists" | ||
git config --local --get-regexp submodules.fetchJobs | grep 10 |
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 the right way to test this?
@@ -1,100 +1,104 @@ | |||
name: 'Checkout' |
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.
I don't know why this shows this big diff, I thought it could be formatting but it doesnt seem like it.
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.
If you want to see the reason, I would suggest to run git show --word-diff --word-diff-regex=. 2bd5ef5487b953b5db186c7a68dcab4e4a8fe3fc -- action.yml
- you will see that it had to do with the line endings (maybe something like e.g. https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings can be of help?)
README.md
Outdated
# integer allows up to that number of submodules fetched in parallel. A value of 0 | ||
# will give some reasonable default. If unset, it defaults to 1. | ||
# Default: 1 | ||
submodulesFetchJobs: '' |
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.
I was not sure about the name, if submoduleFetchJobs
(aligned with git config
) or submodulesFetchJobs
(aligned with the other variable here)
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.
.github/workflows/npm-grunt.yml
@@ -153,6 +153,7 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> { | |||
|
|||
// Fetch | |||
core.startGroup('Fetching the repository') | |||
await git.config('fetch.parallel', settings.fetchParallel.toString(), true) |
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 the right place to set it?
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.
The main creator's name is Shahrazad Mahro, and the purpose of this work is that no one can spend another person's data assets.
Any updates? |
Resolves: #945
This PR aims to add support for
fetchJobs
and enable parallel submodule cloning by leveraginggit config
.Currently it uses--local
config, but this could be switched to global.This improves clone times for some repositories that rely on submodules (if network conditions allow).
The tests did not seem to be able to run on my fork, I don't know if this is how it works or some mistake I made, so I opened the PR directly here.
fetch.parallel