0
1
Fork 0
mirror of https://github.com/actions/checkout synced 2024-06-17 14:28:20 +02:00

Implement the fix

This commit is contained in:
John Wesley Walker III 2024-04-23 16:46:32 +00:00
parent a7f790c38a
commit 92b9ac51a1
2 changed files with 4 additions and 0 deletions

2
dist/index.js vendored
View file

@ -582,6 +582,8 @@ class GitCommandManager {
disableSparseCheckout() { disableSparseCheckout() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
yield this.execGit(['sparse-checkout', 'disable']); yield this.execGit(['sparse-checkout', 'disable']);
// Disabling 'sparse-checkout` leaves behind an undesirable side-effect in config (even in a pristine environment).
yield this.tryConfigUnset('extensions.worktreeConfig', false);
}); });
} }
sparseCheckout(sparseCheckout) { sparseCheckout(sparseCheckout) {

View file

@ -178,6 +178,8 @@ class GitCommandManager {
async disableSparseCheckout(): Promise<void> { async disableSparseCheckout(): Promise<void> {
await this.execGit(['sparse-checkout', 'disable']) await this.execGit(['sparse-checkout', 'disable'])
// Disabling 'sparse-checkout` leaves behind an undesirable side-effect in config (even in a pristine environment).
await this.tryConfigUnset('extensions.worktreeConfig', false)
} }
async sparseCheckout(sparseCheckout: string[]): Promise<void> { async sparseCheckout(sparseCheckout: string[]): Promise<void> {