The way we are getting git repositories in the extension is subject to race conditions. It might be that the getPrimaryRepository function gets the repository, but it is not yet initialized.
A better approach would be to convert getPrimaryRepository to an async function and then call openRepository on the repository that was returned.
The way we are getting git repositories in the extension is subject to race conditions. It might be that the
getPrimaryRepository
function gets the repository, but it is not yet initialized.A better approach would be to convert
getPrimaryRepository
to an async function and then callopenRepository
on the repository that was returned._Originally posted by @50Wliu in https://github.com/microsoft/sarif-vscode-extension/pull/522#discussion_r1333610235_