Always relativize to working directory

This commit is contained in:
Daniel Hengeveld
2016-01-09 12:04:02 -08:00
parent 0c839a91fb
commit ed64abaede

View File

@@ -443,11 +443,8 @@ export default class GitRepositoryAsync {
// value can be passed to {::isStatusModified} or {::isStatusNew} to get more // value can be passed to {::isStatusModified} or {::isStatusNew} to get more
// information. // information.
getDirectoryStatus (directoryPath) { getDirectoryStatus (directoryPath) {
return this.getRepo() return this.relativizeToWorkingDirectory(directoryPath)
.then(repo => { .then(relativePath => this._getStatus([relativePath]))
const relativePath = this.relativize(directoryPath, repo.workdir())
return this._getStatus([relativePath])
})
.then(statuses => { .then(statuses => {
return Promise.all(statuses.map(s => s.statusBit())).then(bits => { return Promise.all(statuses.map(s => s.statusBit())).then(bits => {
return bits return bits