Skip to content
Source
Sign inSign up
pingdotgg/t3code

[codex] Reduce Git status polling churn #3037

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/3037/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 76 additions and 1 deletion (loading 3).

x
0 of 6 viewed, 6 left
1 addition and 1 deletionapps/server/src/git/GitManager.tsModified
View file
@@ -747,7 +747,7 @@
const readRemoteStatus = Effect.fn("readRemoteStatus")(function* (cwd: string) {
const details = yield* gitCore
- .statusDetails(cwd)
+ .statusDetailsRemote(cwd)
.pipe(Effect.catchIf(isNotGitRepositoryError, () => Effect.succeed(null)));
if (details === null || !details.isRepo) {
return null;
14 additions and 0 deletionsapps/server/src/vcs/GitVcsDriver.tsModified
View file
@@ -68,6 +68,17 @@
aheadOfDefaultCount: number;
​
+export interface GitRemoteStatusDetails {
+ isRepo: boolean;
+ isDefaultBranch: boolean;
+ branch: string | null;
+ upstreamRef: string | null;
+ hasUpstream: boolean;
+ aheadCount: number;
+ behindCount: number;
+ aheadOfDefaultCount: number;
+}
+​
export interface GitPreparedCommitContext {
stagedSummary: string;