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
// 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