MCPcopy
hub / github.com/coder/mux / executeWorkspaceFetch

Method executeWorkspaceFetch

src/browser/stores/GitStatusStore.ts:916–938  ·  view source on GitHub ↗
(
    workspaceId: string,
    repoRootProjectPath?: string | null
  )

Source from the content-addressed store, hash-verified

914 }
915
916 private async executeWorkspaceFetch(
917 workspaceId: string,
918 repoRootProjectPath?: string | null
919 ): Promise<void> {
920 assert(this.client, "Git fetch requires an initialized client");
921
922 const result = await this.client.workspace.executeBash({
923 workspaceId,
924 script: GIT_FETCH_SCRIPT,
925 // Passive fetches use the runtime path because git fetch / git ls-remote
926 // may need remote credentials that only exist inside the runtime. These
927 // background fetches are only scheduled when that runtime is already running.
928 options: repoRootBashOptions(30, repoRootProjectPath),
929 });
930
931 if (!result.success) {
932 throw new Error(result.error);
933 }
934
935 if (!result.data.success) {
936 throw new Error(result.data.error || "Unknown error");
937 }
938 }
939
940 private async fetchSecondaryWorkspaceRepos(
941 fetchKey: string,

Callers 2

fetchWorkspaceMethod · 0.95

Calls 3

repoRootBashOptionsFunction · 0.90
executeBashMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected