From ed64abaedebd732b2adcb49234294bfc423ce02a Mon Sep 17 00:00:00 2001 From: Daniel Hengeveld Date: Sat, 9 Jan 2016 12:04:02 -0800 Subject: [PATCH] Always relativize to working directory --- src/git-repository-async.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index b87ac648d..a0e85a01d 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -443,11 +443,8 @@ export default class GitRepositoryAsync { // value can be passed to {::isStatusModified} or {::isStatusNew} to get more // information. getDirectoryStatus (directoryPath) { - return this.getRepo() - .then(repo => { - const relativePath = this.relativize(directoryPath, repo.workdir()) - return this._getStatus([relativePath]) - }) + return this.relativizeToWorkingDirectory(directoryPath) + .then(relativePath => this._getStatus([relativePath])) .then(statuses => { return Promise.all(statuses.map(s => s.statusBit())).then(bits => { return bits