Scope upstream refresh in checkout effect lifecycle
- Replace fire-and-forget `Effect.runPromise` call with `Effect.forkScoped` - Keep checkout responsive while tying upstream refresh to scoped effect management
This commit is contained in:
1 parent
5e55aa387f
commit
c91b79b6e2
1 file changed
+3
-5
@@ -1167,11 +1167,9 @@ const makeGitCore = Effect.gen(function* () {
|
||||
});
|
||||
|
||||
// Refresh upstream refs in the background so checkout remains responsive.
|
||||
yield* Effect.sync(() => {
|
||||
void Effect.runPromise(
|
||||
refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.catch(() => Effect.void)),
|
||||
);
|
||||
});
|
||||
yield* Effect.forkScoped(
|
||||
refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.catch(() => Effect.void)),
|
||||
);
|
||||
});
|
||||
|
||||
const initRepo: GitCoreShape["initRepo"] = (input) =>
|
||||
|
||||
Reference in new issue
Block a user