MCPcopy Index your code
hub / github.com/coder/mux / checkBaseRepoRevisionConnectivity

Method checkBaseRepoRevisionConnectivity

src/node/runtime/SSHRuntime.ts:887–911  ·  view source on GitHub ↗
(
    baseRepoPathArg: string,
    revision: string,
    abortSignal?: AbortSignal
  )

Source from the content-addressed store, hash-verified

885 }
886
887 private async checkBaseRepoRevisionConnectivity(
888 baseRepoPathArg: string,
889 revision: string,
890 abortSignal?: AbortSignal
891 ): Promise<{ healthy: true } | { healthy: false; detail: string }> {
892 const result = await execBuffered(
893 this,
894 `git -C ${baseRepoPathArg} fsck --connectivity-only --no-dangling ${shescape.quote(revision)}`,
895 {
896 cwd: "/tmp",
897 timeout: BASE_REPO_CONNECTIVITY_CHECK_TIMEOUT_SECONDS,
898 abortSignal,
899 }
900 );
901
902 if (result.exitCode === 0) {
903 return { healthy: true };
904 }
905
906 const detail = [result.stderr, result.stdout].join("\n").trim() || `exit ${result.exitCode}`;
907 return {
908 healthy: false,
909 detail,
910 };
911 }
912
913 private async repairBaseRepoMissingObjectsFromLocal(
914 projectPath: string,

Callers 1

Calls 1

execBufferedFunction · 0.90

Tested by

no test coverage detected