fix: sparo checkout does not sync sparse profile when checkout file paths

This commit is contained in:
Cheng Liu 2024-03-29 14:21:02 -07:00
parent 9816572781
commit 29ba4e4123
No known key found for this signature in database
GPG key ID: EEC8452F7DB85CD6
2 changed files with 18 additions and 5 deletions

View file

@ -204,11 +204,14 @@ export class CheckoutCommand implements ICommand<ICheckoutCommandOptions> {
throw new Error(`git checkout failed`); throw new Error(`git checkout failed`);
} }
// sync local sparse checkout state with given profiles. // No need to sync sparse checkout state if the target kind is file path
await this._sparoProfileService.syncProfileState({ if (checkoutTargetKind !== 'filePath') {
profiles: isNoProfile ? undefined : profiles, // Sync local sparse checkout state with given profiles.
addProfiles await this._sparoProfileService.syncProfileState({
}); profiles: isNoProfile ? undefined : profiles,
addProfiles
});
}
}; };
public getHelp(): string { public getHelp(): string {

View file

@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "sparo",
"comment": "No need to sync sparse checkout state if the target kind is file path",
"type": "none"
}
],
"packageName": "sparo"
}