File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2190,16 +2190,14 @@ export const makeGitCore = Effect.fn("makeGitCore")(function* (options?: {
21902190 fallbackErrorMessage : "git branch create failed" ,
21912191 } ) ;
21922192 if ( input . checkout ) {
2193- yield * Effect . scoped (
2194- checkoutBranch ( { cwd : input . cwd , branch : input . branch } ) . pipe (
2195- Effect . catchTag ( "GitCheckoutDirtyWorktreeError" , ( e ) =>
2196- Effect . fail (
2197- createGitCommandError (
2198- "GitCore.createBranch.checkout" ,
2199- input . cwd ,
2200- [ "checkout" , input . branch ] ,
2201- e . message ,
2202- ) ,
2193+ yield * checkoutBranch ( { cwd : input . cwd , branch : input . branch } ) . pipe (
2194+ Effect . catchTag ( "GitCheckoutDirtyWorktreeError" , ( e ) =>
2195+ Effect . fail (
2196+ createGitCommandError (
2197+ "GitCore.createBranch.checkout" ,
2198+ input . cwd ,
2199+ [ "checkout" , input . branch ] ,
2200+ e . message ,
22032201 ) ,
22042202 ) ,
22052203 ) ,
Original file line number Diff line number Diff line change @@ -1529,7 +1529,7 @@ export const makeGitManager = Effect.fn("makeGitManager")(function* () {
15291529 const resolvedBranch = resolveAutoFeatureBranchName ( existingBranchNames , preferredBranch ) ;
15301530
15311531 yield * gitCore . createBranch ( { cwd, branch : resolvedBranch } ) ;
1532- yield * Effect . scoped ( gitCore . checkoutBranch ( { cwd, branch : resolvedBranch } ) ) ;
1532+ yield * gitCore . checkoutBranch ( { cwd, branch : resolvedBranch } ) ;
15331533
15341534 return {
15351535 branchStep : { status : "created" as const , name : resolvedBranch } ,
Original file line number Diff line number Diff line change 77 * @module GitCore
88 */
99import { Context } from "effect" ;
10- import type { Effect , Scope } from "effect" ;
10+ import type { Effect } from "effect" ;
1111import type {
1212 GitCheckoutInput ,
1313 GitCheckoutResult ,
@@ -294,15 +294,9 @@ export interface GitCoreShape {
294294 */
295295 readonly checkoutBranch : (
296296 input : GitCheckoutInput ,
297- ) => Effect . Effect <
298- GitCheckoutResult ,
299- GitCommandError | GitCheckoutDirtyWorktreeError ,
300- Scope . Scope
301- > ;
297+ ) => Effect . Effect < GitCheckoutResult , GitCommandError | GitCheckoutDirtyWorktreeError > ;
302298
303- readonly stashAndCheckout : (
304- input : GitCheckoutInput ,
305- ) => Effect . Effect < void , GitCommandError , Scope . Scope > ;
299+ readonly stashAndCheckout : ( input : GitCheckoutInput ) => Effect . Effect < void , GitCommandError > ;
306300
307301 readonly stashDrop : ( cwd : string ) => Effect . Effect < void , GitCommandError > ;
308302
You can’t perform that action at this time.
0 commit comments