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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour with sparse-checkout: --filter can only be used when extensions.partialClone is set #1502

Open
magmanu opened this issue Oct 4, 2023 · 8 comments

Comments

@magmanu
Copy link

magmanu commented Oct 4, 2023

Hi folks 馃憢馃徑

This action is behaving a bit funny in my workflow.
Update: It works as expected on the main branch, but it's consistently failing when running against other branches, throwing the following error:

--filter can only be used when extensions.partialClone is set

Then it exits with code 128.

Re-running the workflow manually doesn't fix it.

Step:

- name: Checkout conf
        uses: actions/checkout@v4 
        with:
            path: config
            sparse-checkout: zap.conf
            sparse-checkout-cone-mode: false 

Logs on a bad run (dev branch):

Wed, 04 Oct 2023 17:39:37 GMT
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --filter=blob:none --depth=1 origin +REDACTED:refs/remotes/origin/dev_branch
Wed, 04 Oct 2023 17:39:37 GMT
  Error: fatal: --filter can only be used when extensions.partialClone is set
Wed, 04 Oct 2023 17:39:37 GMT
  The process '/usr/bin/git' failed with exit code 128

Details:

  • git version 2.42.0
  • Trigger: workflow dispatch
  • Run was targeting workflow1.yml on dev_branch, the step is as described above
  • manually re-running did not solve the issue
  • I confirm zap.conf exists in the branch

Logs on a good run (main branch):

Wed, 04 Oct 2023 15:50:35 GMT
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --filter=blob:none --depth=1 origin +REDACTED:refs/remotes/origin/main
Wed, 04 Oct 2023 15:50:36 GMT
  remote: Enumerating objects: 9265, done.        
  ...

Details:

  • Same git version
  • Trigger: repository dispatch
  • Run targeting workflow1.yml on main, the step is as described above

Thanks

@epoch70
Copy link

epoch70 commented Oct 6, 2023

+1

1 similar comment
@sandeepprasai
Copy link

+1

@mazzy89
Copy link

mazzy89 commented Jan 8, 2024

I'm having the same issue.

@kmkacpermajor
Copy link

Same issue

@robertellicott
Copy link

Me too

@jakub-lesniak-ikea
Copy link

Same here..

@cbb330
Copy link

cbb330 commented Apr 8, 2024

For me, bumping git to at least 2.28 fixed this issue. I found the solution from this thread: #1386

I recognize in your description your git version is stated 2.42.

so my solution is just one data point.

@jakub-lesniak-ikea
Copy link

Similar for me - I realized I had an old git version 2.25, so just bumping the version made this work.

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

8 participants