[SR-13484] Use --no-checkout
when cloning packages, since it's immediately followed by a checkout
anyway
#2903
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SwiftPM fetches a remote repository by mirroring it to the local file system, then clones that local repository to a working directory, after which it checks out a specific ref.
When the local clone happens, Git also does a checkout. This is unnecessary, since the checkout will immediately be replaced by the intended ref, and it also makes the checkout sensitive to whether the default branch name is set up correctly for the repository.
Since the working copy is guaranteed to be checked out after the clone, there is no need to do a checkout as part of the cloning.
rdar://68165300