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

fix: sparse-checkout not disabled on subsequent checkout #2034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

antoineco
Copy link

@antoineco antoineco commented Jan 8, 2025

If actions/checkout is invoked once with sparse-checkout and cone mode disabled, core.sparseCheckout remains enabled for all subsequent invocations of actions/checkout.

This PR addresses the problem by explicitly (re)setting core.sparseCheckout to false (which is the workaround I currently use in my workflow via a separate step).

Reproduction:

    steps:
      - uses: actions/checkout@v4
        with:
          ref: mybranch
          sparse-checkout-cone-mode: false
          sparse-checkout: /my.config

     # $ ls
     # /my.config

      - uses: actions/checkout@v4
        with:
          ref: mybranch

     # $ ls
     # /my.config

If actions/checkout is invoked once with 'sparse-checkout' and cone mode
disabled, core.sparseCheckout remains enabled for all subsequent
invocations of actions/checkout.
@antoineco antoineco requested a review from a team as a code owner January 8, 2025 12:46
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

Successfully merging this pull request may close these issues.

1 participant