Skip to content

Commit

Permalink
Merge pull request #7026 from spalger/fix/collectFilesToCommit
Browse files Browse the repository at this point in the history
[grunt/collectFilesToCommit] fix the broken "pathsToIgnore" filter
  • Loading branch information
spalger committed Apr 28, 2016
2 parents f161dc9 + 45087da commit b5e61dc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tasks/utils/files_to_commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ 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 => {
return output
.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();
Expand Down

0 comments on commit b5e61dc

Please sign in to comment.