fix(server): keep large sparse checkouts on the fast checkpoint path #12154
Mergedvedprakash2302(GitHub profile, opens in a new tab)merged 3 commits into
main fromrefs/pull/12154/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- @@ -795,8 +808,18 @@795808 // read-tree can rewrite the index, so restore its racy timestamp afterward.796809 yield* fileSystem.utimes(tempIndexPath, indexTime, indexTime);797- const entries = yield* execute({810+ let specialFlags = false;811+ let recordStart = true;812+ yield* vcsProcess.run({798813 operation,814+ command: "git",799815 cwd: input.cwd,800- args: ["ls-files", "-v"],816+ args: [...indexConfig, "ls-files", "--sparse", "-v", "-z"],801817 env: commitEnv,802- maxOutputBytes: WORKSPACE_FILES_MAX_OUTPUT_BYTES,818+ maxOutputBytes: 4_096,819+ outputMode: "truncate",820+ // Inspect every tag without retaining paths or stopping at the output cap.821+ onStdoutChunk: (chunk) => {822+ for (const byte of chunk) {823+ if (824+ recordStart &&825+ ((byte >= 97 && byte <= 122) || (!sparseCheckout && byte === 83))@@ -817,4 +866,5 @@817866 yield* execute({818867 operation,819868 cwd: input.cwd,820- args: ["add", "-A", "--", "."],869+ // Preserve absent skipped entries, but capture present nonignored files outside the cone.870+ args: [...indexConfig, "add", ...(sparseCheckout ? ["--sparse"] : []), "-A", "--", "."],
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
juliusmarminge merged thisc1738f1
juliusmarminge closed this
Sign in to join this conversation.
Codex Review Summary#
This comment shows the latest Codex review activity on this pull request.
c9f1511ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.