| 2 | |
| 3 | /** Options that can be passed to `git diff --no-index` */ |
| 4 | export interface GitDiffOptions { |
| 5 | /** aka -w */ |
| 6 | ignoreAllSpace: boolean; |
| 7 | /** aka -b */ |
| 8 | ignoreSpaceChange: boolean; |
| 9 | /** The default diff algorithm is myers */ |
| 10 | diffAlgorithm: DiffAlgorithm; |
| 11 | /** aka -W */ |
| 12 | functionContext: boolean; |
| 13 | /** aka -U<N>. Show this many lines of context. */ |
| 14 | unified: number; |
| 15 | /** Adjust rename threshold (percent of file). Default is 50. */ |
| 16 | findRenames: number; |
| 17 | /** Find copies in addition to renames. Units are percents. */ |
| 18 | findCopies?: number; |
| 19 | } |
| 20 | |
| 21 | export function gitDiffOptionsToFlags(opts: Partial<GitDiffOptions>) { |
| 22 | const flags = []; |
nothing calls this directly
no outgoing calls
no test coverage detected