Merge pull request #7026 from spalger/fix/collectFilesToCommit

[grunt/collectFilesToCommit] fix the broken "pathsToIgnore" filter
This commit is contained in:
Spencer 2016-04-28 13:06:57 -05:00
commit b5e61dcbef

View file

@ -5,7 +5,6 @@ import { includes } from 'lodash';
export default function filesToCommit(path) {
const simpleGit = new SimpleGit(path);
const gitDiff = promisify(simpleGit.diff, simpleGit);
const pathsToIgnore = ['webpackShims'];
return gitDiff(['--name-status', '--cached'])
.then(output => {
@ -13,9 +12,6 @@ export default function filesToCommit(path) {
.split('\n')
.map(line => line.trim().split('\t'))
.filter(parts => parts.length === 2)
.filter(parts => {
return pathsToIgnore.reduce((prev, curr) => {(prev === false) ? prev : parts[1].indexOf(curr) === -1;}, true);
})
.map(parts => {
const status = parts.shift();
const name = parts.join('\t').trim();