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 authored and Julius Marminge committed 2026-03-01 20:06:21 -08:00
1 parent 5e55aa387f
commit c91b79b6e2
1 file changed
+3 -5
+3 -5
View File
@@ -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) =>