From e58f91a0116da657d8f31ad7d6742719c1a38415 Mon Sep 17 00:00:00 2001 From: Gabe Martin Date: Fri, 4 Sep 2015 23:33:47 -0700 Subject: [PATCH] Add option to gitadd to allow for git resolvable pathspecs --- lib/command_add.js | 6 ++++++ test/add_test.js | 13 +++++++++++++ 2 files changed, 19 insertions(+) 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); + }); });