A lil more efficient .getReferenceTarget.

This commit is contained in:
joshaber
2015-12-03 12:26:32 -05:00
parent 74a0528bef
commit df839537a9

View File

@@ -304,8 +304,8 @@ export default class GitRepositoryAsync {
// given reference.
getReferenceTarget (reference, _path) {
return this._getRepo(_path)
.then(repo => repo.getReference(reference))
.then(ref => ref.target().tostrS())
.then(repo => Git.Reference.nameToId(repo, reference))
.then(oid => oid.tostrS())
}
// Reading Status