From 60fc0acb715132bf7d70244bfb5db45585f20d1f Mon Sep 17 00:00:00 2001 From: joshaber Date: Mon, 4 Jan 2016 13:25:51 -0500 Subject: [PATCH] Relativize these paths too. --- src/git-repository-async.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index 430423ac8..d9a0c3214 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -385,7 +385,8 @@ export default class GitRepositoryAsync { // Returns a {Promise} which resolves to a {Boolean} that's true if the `path` // is modified. isPathModified (_path) { - return this._getStatus([_path]) + return this.relativizeToWorkingDirectory(_path) + .then(relativePath => this._getStatus([relativePath])) .then(statuses => statuses.some(status => status.isModified())) } @@ -396,7 +397,8 @@ export default class GitRepositoryAsync { // Returns a {Promise} which resolves to a {Boolean} that's true if the `path` // is new. isPathNew (_path) { - return this._getStatus([_path]) + return this.relativizeToWorkingDirectory(_path) + .then(relativePath => this._getStatus([relativePath])) .then(statuses => statuses.some(status => status.isNew())) }