mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-07 07:40:40 +03:00
Document why
This commit is contained in:
parent
d11e30579b
commit
cd8b28da4d
@ -492,6 +492,11 @@ class GitRepository
|
||||
# Returns a promise that resolves when the repository has been refreshed.
|
||||
refreshStatus: ->
|
||||
statusesChanged = false
|
||||
|
||||
# Listen for `did-change-statuses` so we know if something changed. But we
|
||||
# need to wait to propagate it until after we've set the branch and cleared
|
||||
# the `statusesByPath` cache. So just set a flag, and we'll emit the event
|
||||
# after refresh is done.
|
||||
subscription = @async.onDidChangeStatuses ->
|
||||
subscription?.dispose()
|
||||
subscription = null
|
||||
|
Loading…
Reference in New Issue
Block a user