@@ -139,7 +139,7 @@ interface GitRefsSnapshot {
139139
140140interface ExecuteGitOptions {
141141 stdin ?: string | undefined ;
142- timeoutMs ?: number | undefined ;
142+ timeoutMs ?: number | null | undefined ;
143143 allowNonZeroExit ?: boolean | undefined ;
144144 fallbackErrorDetail ?: string | undefined ;
145145 env ?: NodeJS . ProcessEnv | undefined ;
@@ -712,7 +712,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
712712 ...input ,
713713 args : [ ...input . args ] ,
714714 } as const ;
715- const timeoutMs = input . timeoutMs ?? DEFAULT_TIMEOUT_MS ;
715+ const timeoutMs = input . timeoutMs === undefined ? DEFAULT_TIMEOUT_MS : input . timeoutMs ;
716716 const maxOutputBytes = input . maxOutputBytes ?? DEFAULT_MAX_OUTPUT_BYTES ;
717717 const appendTruncationMarker = input . appendTruncationMarker ?? false ;
718718
@@ -813,8 +813,12 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
813813 } satisfies GitVcsDriver . ExecuteGitResult ;
814814 } ) ;
815815
816- return yield * runGitCommand ( ) . pipe (
817- Effect . scoped ,
816+ const execution = runGitCommand ( ) . pipe ( Effect . scoped ) ;
817+ if ( timeoutMs === null ) {
818+ return yield * execution ;
819+ }
820+
821+ return yield * execution . pipe (
818822 Effect . timeoutOption ( timeoutMs ) ,
819823 Effect . flatMap ( ( result ) =>
820824 Option . match ( result , {
@@ -905,9 +909,9 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
905909 operation : string ,
906910 cwd : string ,
907911 args : readonly string [ ] ,
908- allowNonZeroExit = false ,
912+ options : ExecuteGitOptions = { } ,
909913 ) : Effect . Effect < void , GitCommandError > =>
910- executeGit ( operation , cwd , args , { allowNonZeroExit } ) . pipe ( Effect . asVoid ) ;
914+ executeGit ( operation , cwd , args , options ) . pipe ( Effect . asVoid ) ;
911915
912916 const runGitStdout = (
913917 operation : string ,
@@ -1905,12 +1909,12 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
19051909 const requestedRemoteName = options ?. remoteName ?. trim ( ) || null ;
19061910 if ( requestedRemoteName ) {
19071911 const publishBranch = yield * resolvePublishBranchName ( cwd , branch ) ;
1908- yield * runGit ( "GitVcsDriver.pushCurrentBranch.pushWithRequestedRemote" , cwd , [
1909- "push " ,
1910- "-u" ,
1911- requestedRemoteName ,
1912- `HEAD:refs/heads/ ${ publishBranch } ` ,
1913- ] ) ;
1912+ yield * runGit (
1913+ "GitVcsDriver.pushCurrentBranch.pushWithRequestedRemote " ,
1914+ cwd ,
1915+ [ "push" , "-u" , requestedRemoteName , `HEAD:refs/heads/ ${ publishBranch } ` ] ,
1916+ { timeoutMs : null } ,
1917+ ) ;
19141918 return {
19151919 status : "pushed" as const ,
19161920 branch,
@@ -1968,12 +1972,12 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
19681972 } ) ;
19691973 }
19701974 const publishBranch = yield * resolvePublishBranchName ( cwd , branch ) ;
1971- yield * runGit ( "GitVcsDriver.pushCurrentBranch.pushWithUpstream" , cwd , [
1972- "push " ,
1973- "-u" ,
1974- publishRemoteName ,
1975- `HEAD:refs/heads/ ${ publishBranch } ` ,
1976- ] ) ;
1975+ yield * runGit (
1976+ "GitVcsDriver.pushCurrentBranch.pushWithUpstream " ,
1977+ cwd ,
1978+ [ "push" , "-u" , publishRemoteName , `HEAD:refs/heads/ ${ publishBranch } ` ] ,
1979+ { timeoutMs : null } ,
1980+ ) ;
19771981 return {
19781982 status : "pushed" as const ,
19791983 branch,
@@ -1986,11 +1990,12 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
19861990 Effect . orElseSucceed ( ( ) => null ) ,
19871991 ) ;
19881992 if ( currentUpstream ) {
1989- yield * runGit ( "GitVcsDriver.pushCurrentBranch.pushUpstream" , cwd , [
1990- "push" ,
1991- currentUpstream . remoteName ,
1992- `HEAD:refs/heads/${ currentUpstream . branchName } ` ,
1993- ] ) ;
1993+ yield * runGit (
1994+ "GitVcsDriver.pushCurrentBranch.pushUpstream" ,
1995+ cwd ,
1996+ [ "push" , currentUpstream . remoteName , `HEAD:refs/heads/${ currentUpstream . branchName } ` ] ,
1997+ { timeoutMs : null } ,
1998+ ) ;
19941999 return {
19952000 status : "pushed" as const ,
19962001 branch,
@@ -1999,7 +2004,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
19992004 } ;
20002005 }
20012006
2002- yield * runGit ( "GitVcsDriver.pushCurrentBranch.push" , cwd , [ "push" ] ) ;
2007+ yield * runGit ( "GitVcsDriver.pushCurrentBranch.push" , cwd , [ "push" ] , { timeoutMs : null } ) ;
20032008 return {
20042009 status : "pushed" as const ,
20052010 branch,
0 commit comments