MCPcopy
hub / github.com/desktop/desktop / getBinaryPaths

Function getBinaryPaths

app/src/lib/git/diff.ts:915–929  ·  view source on GitHub ↗
(
  repository: Repository,
  ref: string,
  conflictedFilesInIndex: ReadonlyArray<IStatusEntry>
)

Source from the content-addressed store, hash-verified

913 * otherwise you should probably pass `'HEAD'` to get a diff of the working tree vs `HEAD`
914 */
915export async function getBinaryPaths(
916 repository: Repository,
917 ref: string,
918 conflictedFilesInIndex: ReadonlyArray<IStatusEntry>
919): Promise<ReadonlyArray<string>> {
920 const [detectedBinaryFiles, conflictedFilesUsingBinaryMergeDriver] =
921 await Promise.all([
922 getDetectedBinaryFiles(repository, ref),
923 getFilesUsingBinaryMergeDriver(repository, conflictedFilesInIndex),
924 ])
925
926 return Array.from(
927 new Set([...detectedBinaryFiles, ...conflictedFilesUsingBinaryMergeDriver])
928 )
929}
930
931/**
932 * Runs diff --numstat to get the list of files that have changed and which

Callers 4

diff-test.tsFile · 0.90
getMergeConflictDetailsFunction · 0.90
getRebaseConflictDetailsFunction · 0.90

Calls 2

getDetectedBinaryFilesFunction · 0.85

Tested by

no test coverage detected