Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): git status refresh reads local status once unless refs moved #29155

MergedYuruzuu(GitHub profile, opens in a new tab)merged 10 commits intomain fromrefs/pull/29155/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 98 additions and 0 deletions (loading 3).

x
0 of 6 viewed, 6 left
2 additions and 0 deletionsapps/server/src/git/GitWorkflowService.tsModified
View file
@@ -67,6 +67,7 @@
) => Effect.Effect<VcsStatusRemoteResult | null, GitManagerServiceError>;
readonly invalidateLocalStatus: (cwd: string) => Effect.Effect<void, never>;
readonly invalidateRemoteStatus: (cwd: string) => Effect.Effect<void, never>;
+ readonly readRefSnapshot: (cwd: string) => Effect.Effect<string | null>;
readonly invalidateStatus: (cwd: string) => Effect.Effect<void, never>;
/** The checkout's own HEAD file, inside a linked worktree's admin directory when there is one. */
readonly headPath: (cwd: string) => Effect.Effect<string | null, never>;
@@ -390,6 +391,7 @@
}),
invalidateLocalStatus: gitManager.invalidateLocalStatus,
invalidateRemoteStatus: gitManager.invalidateRemoteStatus,
+ readRefSnapshot: git.readRefSnapshot,
invalidateStatus: gitManager.invalidateStatus,
headPath: Effect.fn("GitWorkflowService.headPath")(function (cwd) {
return git
2 additions and 0 deletionsapps/server/src/vcs/GitVcsDriver.tsModified
View file
@@ -337,6 +337,8 @@
cwd: string,
options?: GitRemoteStatusOptions,
) => Effect.Effect<GitRemoteStatusDetails, GitCommandError>;
+ /** Refs, HEAD and shallow boundaries. Null when the snapshot cannot be read. */
+ readonly readRefSnapshot: (cwd: string) => Effect.Effect<string | null>;
readonly prepareCommitContext: (
cwd: string,
filePaths?: readonly string[],