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

Sparse checkout not working with git version between 2.25 and 2.28 #1386

Open
dfdez opened this issue Jun 16, 2023 · 4 comments
Open

Sparse checkout not working with git version between 2.25 and 2.28 #1386

dfdez opened this issue Jun 16, 2023 · 4 comments

Comments

@dfdez
Copy link
Contributor

dfdez commented Jun 16, 2023

From this comment and after some digging a figure out that sparse-checkout won't work on a git version between 2.25 and 2.28.

You can see the commit of git here where I find out in which version that error stop to be a problem

Before 2.28 in order to use --filter=<filter> on the git fetch the extensions.partialClone config had to be set in order to be able to use it...

Therefore in order to solve this we have 2 solutions:

  1. Change the required version to 2.28
  2. Update the current implementation to solve this use case

What do you think about this @dscho?

@dscho
Copy link
Contributor

dscho commented Jun 22, 2023

My preference would be to bump the minimum Git version.

@dfdez
Copy link
Contributor Author

dfdez commented Jun 22, 2023

I think that is going to be the cleaner solution 👍🏽

@jkwinder
Copy link

This feature isn't working for me today on git 2.41.0 on a windows runner. This is the error:
Warning: Unexpected input(s) 'sparse-checkout', valid inputs are ['repository', 'ref', 'token', 'ssh-key', 'ssh-known-hosts', 'ssh-strict', 'persist-credentials', 'path', 'clean', 'fetch-depth', 'lfs', 'submodules', 'set-safe-directory', 'github-server-url']

yml file looks like this:
- uses: actions/checkout@v3
with:
sparse-checkout: |
.github
SPA${{ matrix.angDir }}
Deployment\SPANexusIQScanAppIdMapping.json

Any ideas what I'm missing? Or is this still broken on git 2.41?

@dscho
Copy link
Contributor

dscho commented Aug 14, 2023

@jkwinder this is a totally different issue than what is described in #1386 (comment). A new ticket would be more appropriate, and if you choose to open that, do link to a workflow run that demonstrates the issue.

jww3 added a commit that referenced this issue Mar 13, 2024
jww3 added a commit that referenced this issue Mar 14, 2024
* Check git version before attempting to disable `sparse-checkout`
* Bump `MinimumGitSparseCheckoutVersion` to 2.28 due to #1386
* Initial prep for release 4.1.3
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

No branches or pull requests

3 participants