diff --git a/src/git-repository-async.js b/src/git-repository-async.js index 116f52216..42e53f105 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -210,7 +210,10 @@ export default class GitRepositoryAsync { getAheadBehindCount (reference, _path) { return this._getRepo(_path) .then(repo => Promise.all([repo, repo.getBranch(reference)])) - .then(([repo, local]) => Promise.all([repo, local, Git.Branch.upstream(local)])) + .then(([repo, local]) => { + const upstream = Git.Branch.upstream(local).catch(_ => null) + return Promise.all([repo, local, upstream]) + }) .then(([repo, local, upstream]) => { if (!upstream) return {ahead: 0, behind: 0}