From 6c3429abae96b2949b71ec068e8a34ec5dad5e17 Mon Sep 17 00:00:00 2001 From: Robert Fentress Date: Thu, 11 Aug 2016 11:45:18 -0400 Subject: [PATCH] enhancement: find nearest parent containing .git and execute git commands from there Closes #84 and #41 --- README.md | 4 ++++ lib/get-hook.js | 2 +- package.json | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6eb9a1..c46f079 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,10 @@ exit status would have, check the [git-scm docs](https://git-scm.com/docs/githoo + [github/therealklanni](https://github.com/therealklanni) + [twitter/therealklanni](http://twitter.com/therealklanni) +## Contributor + +**Robert Fentress** + ## License MIT © Kevin Lanni diff --git a/lib/get-hook.js b/lib/get-hook.js index b70d868..ae288df 100644 --- a/lib/get-hook.js +++ b/lib/get-hook.js @@ -22,7 +22,7 @@ function getIndexed() { function streamFromIndexed(gulp, options) { return gulp.src(getIndexed(), options) .pipe(map(function (file, cb) { - var hash = execSync('git ls-files -s ' + file.path, { + var hash = execSync('git ls-files -s ' + file.path + ')', { silent: true }).output.split(' ')[1]; var hash = execSync('(cd ' + dir + 'g && it ls-files -s ' + file.path + ')', { diff --git a/package.json b/package.json index 82eb9a7..b81ad3b 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "description": "Simple git-hook integration for your gulp workflows.", "homepage": "https://github.com/therealklanni/git-guppy", "author": "Kevin Lanni (https://github.com/therealklanni)", + "contributors": [ { + "name": "Robert Fentress" + }], "repository": { "type": "git", "url": "https://github.com/therealklanni/git-guppy.git" @@ -30,7 +33,9 @@ }, "devDependencies": { "chai": "^3.5.0", + "find-parent-dir": "^0.3.0", + "gulp": "^3.9.1", "gulp-filter": "^4.0.0", "gulp-istanbul": "^1.0.0",