* Runs diff --numstat to get the list of files that have changed and which * Git have detected as binary files
(repository: Repository, ref: string)
| 933 | * Git have detected as binary files |
| 934 | */ |
| 935 | async function getDetectedBinaryFiles(repository: Repository, ref: string) { |
| 936 | const { stdout } = await git( |
| 937 | ['diff', '--numstat', '-z', ref], |
| 938 | repository.path, |
| 939 | 'getBinaryPaths' |
| 940 | ) |
| 941 | |
| 942 | return Array.from(stdout.matchAll(binaryListRegex), m => m[1]) |
| 943 | } |
| 944 | |
| 945 | const binaryListRegex = /-\t-\t(?:\0.+\0)?([^\0]*)/gi |
| 946 |