refactor(storage): centralize sanitized Git subprocess execution - #4934
refactor(storage): centralize sanitized Git subprocess execution#4934seekskyworld wants to merge 1 commit into
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Astro-Han
left a comment
There was a problem hiding this comment.
Reviewed exact head 1feaf39d00b1286eb441afbecf1979e82d701cbe.
I found no P0-P3 correctness, ownership, race, repository-selection, timeout, or temporary-index issue in the five-file diff. packages/storage/src/git-exec.ts:20-80 preserves the prior timeout and buffer behavior, isolates Git from ambient repository variables, and retains explicit temporary-index support. The worktree executor, project catalog, and workspace identity callers use the helper with their previous limits; the new test covers both text and byte output with invalid ambient Git variables.
The exact-head hosted label and test checks passed, and the merge-tree and diff check are clean. I could not run the local Storage typecheck because this checkout has no usable tsc, and I did not run an additional Windows smoke test. The refactor/product decision remains for human maintainers; this is a technical review only.
Automated review notice: This is an AI-assisted review and does not replace independent human review.
Fixes #4929
Summary
Motivation
Repeated subprocess setup could diverge across security-sensitive Git calls. A single helper keeps repository selection isolated from ambient Git variables while preserving existing timeouts, buffer limits, and error behavior.
Validation