@@ -3730,12 +3730,12 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
37303730 // as renames, but leave the expensive checkout outside the lock.
37313731 yield * configLocks . withLock (
37323732 yield * resolveGitCommonDir ( input . cwd ) ,
3733- runGit ( "GitVcsDriver.createWorktree.createBranch" , input . cwd , [
3734- "branch " ,
3735- "--" ,
3736- input . newRefName ,
3737- input . refName === "-" ? "@{-1}" : input . refName ,
3738- ] ) ,
3733+ executeGitWithStableDiagnostics (
3734+ "GitVcsDriver.createWorktree.createBranch " ,
3735+ input . cwd ,
3736+ [ "branch" , "--" , input . newRefName , input . refName === "-" ? "@{-1}" : input . refName ] ,
3737+ { fallbackErrorDetail : "git worktree add failed" } ,
3738+ ) ,
37393739 ) ;
37403740 }
37413741 const args = [ "worktree" , "add" , "--" , worktreePath , targetBranch ] ;
@@ -3841,31 +3841,33 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
38413841 if ( input . newRefName && input . baseRefName ) {
38423842 const base = yield * resolveBranchBase ( input . cwd , input . baseRefName ) ;
38433843 if ( base ) {
3844- yield * configLocks . withLock (
3845- yield * resolveGitCommonDir ( input . cwd ) ,
3846- Effect . gen ( function * ( ) {
3847- yield * runGit ( "GitVcsDriver.createWorktree.configureBaseRef" , input . cwd , [
3848- "config" ,
3849- `branch.${ input . newRefName } .gh-merge-base` ,
3850- base . branchName ,
3851- ] ) ;
3852- if ( base . baseRef . startsWith ( "refs/remotes/" ) ) {
3853- // gh consumes its key as a provider branch; T3 also needs the selected remote.
3854- yield * runGit ( "GitVcsDriver.createWorktree.configureComparisonRef" , input . cwd , [
3855- "config" ,
3856- `branch.${ input . newRefName } .t3-merge-base-ref` ,
3857- base . baseRef ,
3858- ] ) ;
3859- }
3860- } ) ) . pipe (
3861- Effect . catchTags ( {
3862- GitCommandError : ( ) =>
3863- Effect . logWarning (
3864- "worktree base-ref configuration failed; using base-branch fallback" ,
3865- ) ,
3866- } ) ,
3867- ) ,
3868- ) ;
3844+ yield * configLocks
3845+ . withLock (
3846+ yield * resolveGitCommonDir ( input . cwd ) ,
3847+ Effect . gen ( function * ( ) {
3848+ yield * runGit ( "GitVcsDriver.createWorktree.configureBaseRef" , input . cwd , [
3849+ "config" ,
3850+ `branch.${ input . newRefName } .gh-merge-base` ,
3851+ base . branchName ,
3852+ ] ) ;
3853+ if ( base . baseRef . startsWith ( "refs/remotes/" ) ) {
3854+ // gh consumes its key as a provider branch; T3 also needs the selected remote.
3855+ yield * runGit ( "GitVcsDriver.createWorktree.configureComparisonRef" , input . cwd , [
3856+ "config" ,
3857+ `branch.${ input . newRefName } .t3-merge-base-ref` ,
3858+ base . baseRef ,
3859+ ] ) ;
3860+ }
3861+ } ) ,
3862+ )
3863+ . pipe (
3864+ Effect . catchTags ( {
3865+ GitCommandError : ( ) =>
3866+ Effect . logWarning (
3867+ "worktree base-ref configuration failed; using base-branch fallback" ,
3868+ ) ,
3869+ } ) ,
3870+ ) ;
38693871 }
38703872 }
38713873
@@ -4069,7 +4071,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
40694071 timeToLive : ( ) => Duration . zero ,
40704072 } ,
40714073 ) ;
4072- const fetchRemoteShared : GitVcsDriver . GitVcsDriver [ "Service" ] [ "fetchRemote" ] = ( input ) =>
4074+ const fetchRemoteShared = ( input : GitVcsDriver . GitFetchRemoteInput ) =>
40734075 Cache . get (
40744076 fetchRemoteInFlight ,
40754077 new FetchRemoteKey ( {
@@ -4551,7 +4553,9 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
45514553 Effect . flatMap ( ( fetched ) =>
45524554 fetched
45534555 ? Effect . void
4554- : fetchRemoteShared ( { cwd : input . cwd , remoteName : input . remoteName } ) . pipe ( Effect . asVoid ) ,
4556+ : fetchRemoteShared ( { cwd : input . cwd , remoteName : input . remoteName } ) . pipe (
4557+ Effect . asVoid ,
4558+ ) ,
45554559 ) ,
45564560 ) ,
45574561 ) ,
0 commit comments