File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import {
3232 type VcsStatusResult ,
3333 type WorktreeSubmodules ,
3434} from "@t3tools/contracts" ;
35- import { HostProcessPlatform } from "@t3tools/shared/hostProcess " ;
35+ import * as HostProcess from "@t3tools/shared/HostProcess " ;
3636import {
3737 makeGitVcsDriverCore ,
3838 PATCH_RENDER_PREFIX_ARGS ,
@@ -793,12 +793,9 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
793793 "core.fsyncMethod=fsync" ,
794794 ] as const ;
795795
796- // Git for Windows cannot open paths longer than MAX_PATH (260 characters) unless
797- // core.longpaths is on, and it is off by default. Without it, checkpoint `git add -A` exits
798- // 128 with "Filename too long" in any workspace holding such a path, and restore cannot write
799- // or clean those files. Checkpoints only snapshot and restore paths that already exist, so
800- // commands that touch the working tree turn it on even if the user's config says false.
801- const longPaths = ( yield * HostProcessPlatform ) === "win32" ? [ "-c" , "core.longpaths=true" ] : [ ] ;
796+ // Checkpoints must handle existing paths beyond Windows MAX_PATH, even when
797+ // core.longpaths is disabled in the user's Git configuration.
798+ const longPaths = ( yield * HostProcess . Platform ) === "win32" ? [ "-c" , "core.longpaths=true" ] : [ ] ;
802799
803800 const checkpoints : VcsDriver . VcsCheckpointOps = {
804801 captureCheckpoint : Effect . fn ( "GitVcsDriver.checkpoints.captureCheckpoint" ) ( function * ( input ) {
You can’t perform that action at this time.
0 commit comments