@@ -759,7 +759,7 @@ it.layer(TestLayer)("git integration", (it) => {
759759 const realGitCore = yield * GitCore ;
760760 let refreshFetchAttempts = 0 ;
761761 const core = yield * makeIsolatedGitCore ( ( input ) => {
762- if ( input . args [ 0 ] === "--git-dir" && input . args [ 2 ] === "fetch ") {
762+ if ( input . operation === "GitCore.fetchUpstreamRefForStatus " ) {
763763 refreshFetchAttempts += 1 ;
764764 return Effect . fail (
765765 new GitCommandError ( {
@@ -805,7 +805,7 @@ it.layer(TestLayer)("git integration", (it) => {
805805 const realGitCore = yield * GitCore ;
806806 let refreshFetchAttempts = 0 ;
807807 const core = yield * makeIsolatedGitCore ( ( input ) => {
808- if ( input . args [ 0 ] === "--git-dir" && input . args [ 2 ] === "fetch ") {
808+ if ( input . operation === "GitCore.fetchUpstreamRefForStatus " ) {
809809 refreshFetchAttempts += 1 ;
810810 return Effect . succeed ( {
811811 code : 0 ,
@@ -853,7 +853,7 @@ it.layer(TestLayer)("git integration", (it) => {
853853 if ( input . args [ 0 ] === "rev-parse" && input . args [ 1 ] === "--git-common-dir" ) {
854854 return ok ( "/repo/.git\n" ) ;
855855 }
856- if ( input . args [ 0 ] === "--git-dir" && input . args [ 2 ] === "fetch ") {
856+ if ( input . operation === "GitCore.fetchUpstreamRefForStatus " ) {
857857 fetchCount += 1 ;
858858 expect ( input . cwd ) . toBe ( "/repo" ) ;
859859 return ok ( ) ;
@@ -913,7 +913,7 @@ it.layer(TestLayer)("git integration", (it) => {
913913 if ( input . args [ 0 ] === "rev-parse" && input . args [ 1 ] === "--git-common-dir" ) {
914914 return ok ( "/repo/.git\n" ) ;
915915 }
916- if ( input . args [ 0 ] === "--git-dir" && input . args [ 2 ] === "fetch ") {
916+ if ( input . operation === "GitCore.fetchUpstreamRefForStatus " ) {
917917 fetchCount += 1 ;
918918 return Effect . fail (
919919 new GitCommandError ( {
@@ -1024,7 +1024,7 @@ it.layer(TestLayer)("git integration", (it) => {
10241024 const realGitCore = yield * GitCore ;
10251025 let fetchArgs : readonly string [ ] | null = null ;
10261026 const core = yield * makeIsolatedGitCore ( ( input ) => {
1027- if ( input . args [ 0 ] === "--git-dir" && input . args [ 2 ] === "fetch ") {
1027+ if ( input . operation === "GitCore.fetchUpstreamRefForStatus " ) {
10281028 fetchArgs = [ ...input . args ] ;
10291029 return Effect . succeed ( {
10301030 code : 0 ,
@@ -1041,6 +1041,8 @@ it.layer(TestLayer)("git integration", (it) => {
10411041 expect ( status . branch ) . toBe ( "upstream/feature" ) ;
10421042 expect ( status . upstreamRef ) . toBe ( `${ remoteName } /${ featureBranch } ` ) ;
10431043 expect ( fetchArgs ) . toEqual ( [
1044+ "-c" ,
1045+ "core.sshCommand=ssh -o BatchMode=yes" ,
10441046 "--git-dir" ,
10451047 path . join ( source , ".git" ) ,
10461048 "fetch" ,
0 commit comments