MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getChangedFiles

Function getChangedFiles

source code/utils/git.ts:371–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

369}
370
371export const getChangedFiles = async (): Promise<string[]> => {
372 const { stdout } = await execFileNoThrow(
373 gitExe(),
374 ['--no-optional-locks', 'status', '--porcelain'],
375 {
376 preserveOutputOnError: false,
377 },
378 )
379 return stdout
380 .trim()
381 .split('\n')
382 .map(line => line.trim().split(' ', 2)[1]?.trim()) // Remove status prefix (e.g., "M ", "A ", "??")
383 .filter(line => typeof line === 'string') // Remove empty entries
384}
385
386export type GitFileStatus = {
387 tracked: string[]

Callers

nothing calls this directly

Calls 1

execFileNoThrowFunction · 0.85

Tested by

no test coverage detected