[grunt/collectFilesToCommit] fix the broken "pathsToIgnore" filter

In 180aacd470 a "pathsToIngore" filter was introduced that didn't work properly and caused all paths to be ignored. This behavior was likely intended to prevent snake_case filename checking on files in the webpackShims directory but that is being properly handled by [check_added_filename](8f9ec7d932/tasks/check_added_filenames.js (L11)).
This commit is contained in:
spalger 2016-04-22 10:39:34 -05:00
parent 8f9ec7d932
commit 45087dad0f

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();