| | |
| | | |
| | | const adapter = { |
| | | findChangedFiles: async (cwd, options) => { |
| | | const changedSince = |
| | | options && (options.withAncestor ? 'HEAD^' : options.changedSince); |
| | | const includePaths = ((options && options.includePaths) || []).map( |
| | | absoluteRoot => path().normalize(path().relative(cwd, absoluteRoot)) |
| | | ); |
| | | var _options$includePaths; |
| | | |
| | | if (options && options.lastCommit) { |
| | | const changedSince = options.withAncestor ? 'HEAD^' : options.changedSince; |
| | | const includePaths = ( |
| | | (_options$includePaths = options.includePaths) !== null && |
| | | _options$includePaths !== void 0 |
| | | ? _options$includePaths |
| | | : [] |
| | | ).map(absoluteRoot => path().normalize(path().relative(cwd, absoluteRoot))); |
| | | |
| | | if (options.lastCommit) { |
| | | return findChangedFilesUsingCommand( |
| | | ['show', '--name-only', '--pretty=format:', 'HEAD', '--'].concat( |
| | | includePaths |