Fix git submodule path cache retention (#7687)

This commit is contained in:
Neil
2026-07-11 01:30:19 -07:00
committed by GitHub
parent d912482752
commit acb35ee649
18 changed files with 807 additions and 112 deletions
+7
View File
@@ -0,0 +1,7 @@
const MUTATING_GIT_EXEC_SUBCOMMANDS = new Set(['clone', 'commit', 'init'])
// Why: relay git.exec permits these narrow write shapes alongside read-only
// probes, so cache invalidation must distinguish them before dispatch.
export function gitExecMutatesRepository(args: readonly string[]): boolean {
return MUTATING_GIT_EXEC_SUBCOMMANDS.has(args[0] ?? '')
}