Repository navigation
fork-ci git-clean: allow the index.sparse checkout's sparse-checkout disable writes - #1281
Conversation
…disable writes actions/checkout runs `git sparse-checkout disable` whenever its sparse-checkout input is empty, then unsets only extensions.worktreeConfig. On git 2.43 that leaves core.sparseCheckout, core.sparseCheckoutCone and index.sparse in .git/config.worktree, even in a new repository, and `check --require` refused index.sparse, so every action's first step failed after such a checkout. Allow index.sparse with a boolean value; any other value is still refused. The other keys checkout writes this way (core.sparseCheckout, core.sparseCheckoutCone, extensions.worktreeConfig) were already allowed. Tests run the real git: `sparse-checkout disable` and `set` (cone and not) on a checkout-shaped repository pass, and a non-boolean index.sparse fails. Fixes #1259 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: Claude (code lens) · read at: b50ed46 blocker: none What I checked
State: 🤖 Generated with Claude Code |
Fixes #1259
What
git_clean.py check --require(ci/v37) refusedindex.sparsein.git/config.worktree. On git 2.43 (Ubuntu 24.04), actions/checkout's owngit sparse-checkout disablewrites that key on every checkout that has nosparse-checkoutinput. So every action that runs the check failed its first step after a normal checkout.ALLOWEDnow hasindex.sparsewith a boolean value (BOOL). Any other value is still refused ("not a value actions/checkout writes"). A comment next to the entry gives the reason.I checked the other keys checkout writes this way with real git 2.43:
sparse-checkout disablewritescore.sparseCheckout,core.sparseCheckoutConeandindex.sparse.sparse-checkout set --coneandset --no-conewritecore.sparseCheckoutandcore.sparseCheckoutCone.extensions.worktreeConfigis unset by checkout afterdisableand kept afterset.All of these keys except
index.sparsewere already allowed as booleans, so nothing else is added.git-clean/README.mdlists the key.RELEASE-NOTES.mdhas an entry, with no upgrade step.Tests (real git, no fixture)
test_checkouts_own_sparse_checkout_disable_passes: makes a repository the way actions/checkout does, runsgit sparse-checkout disable, then unsetsextensions.worktreeConfigas checkout does.problems()must be empty, andcheck --path . --require(the CLI) must exit 0. Fails on main with "config.worktree holds index.sparse, which actions/checkout never writes".test_index_sparse_holds_a_boolean_only: a non-booleanindex.sparseis still refused, by its value. Fails on main because main refuses the key itself, so the value is never checked.test_checkouts_own_sparse_checkout_set_passes: covers thesparse-checkoutinput (set, cone and not cone). It already passes on main and is there as a guard.Run locally:
git_clean.test.py(63 OK),review_config.test.py,review_guide.test.py,fork-head-gate-workflow.test.py: all pass.After merge
This needs a fork-ci release (a new
ci/vN) before SkyRPG can move its pin from ci/v10. The orchestrator runsrelease-at-tip.sh.🤖 Generated with Claude Code