diff --git a/lib/command_add.js b/lib/command_add.js index a659121..7f8e558 100644 --- a/lib/command_add.js +++ b/lib/command_add.js @@ -17,6 +17,12 @@ module.exports = function (task, exec, done) { defaultValue: false, useAsFlag: true, useValue: false + }, + { + option: 'pathSpec', + defaultValue: false, + useAsFlag: false, + useValue: true } ]); diff --git a/test/add_test.js b/test/add_test.js index 95d9834..451b50c 100644 --- a/test/add_test.js +++ b/test/add_test.js @@ -41,4 +41,17 @@ describe('add', function () { .expect(['add', '--all', '.']) .run(done); }); + + it('should add git pathspec format arg when pathspec is specified', function (done) { + var options = { + pathSpec: ['a/*', 'b/*'] + }; + + var files = [ + ]; + + new Test(command, options, files) + .expect(['add', 'a/*', 'b/*']) + .run(done); + }); });