mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
It's fine if there isn't an upstream.
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user