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:
Julius Marminge committed 2026-02-28 22:25:11 -08:00
1 parent 06912c3222
commit 61e1babcc7
1 file changed
+3 -5
+3 -5
View File
@@ -782,11 +782,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) =>