(hash: string, ...paths: string[])
| 234 | |
| 235 | /** Display-only local command; quote even shell metacharacters in Git filenames. */ |
| 236 | export function localCommitCommand(hash: string, ...paths: string[]): string { |
| 237 | if (!/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/.test(hash)) return 'Commit hash unavailable'; |
| 238 | const quote = (value: string): string => `'${value.replaceAll("'", "'\\''")}'`; |
| 239 | return `git show ${hash} -- ${paths.map(quote).join(' ')}`; |
| 240 | } |
| 241 | |
| 242 | export async function fetchSelectionImpact(project: string, target: SelectionImpactTarget, |
| 243 | signal?: AbortSignal, refresh = false, doFetch: typeof fetch = globalThis.fetch): Promise<SelectionImpactReply> { |
no outgoing calls
no test coverage detected