Reduces git calls on known untrackables

This commit is contained in:
Eric Amodio
2017-05-15 01:50:09 -04:00
parent 3a38f6ae39
commit ce5ff1eb47
3 changed files with 18 additions and 11 deletions

View File

@@ -114,7 +114,7 @@ export class GitContextTracker extends Disposable {
private async _updateContextHasRemotes(uri: GitUri | undefined) {
try {
let hasRemotes = false;
if (uri) {
if (uri && this.git.isTrackable(uri)) {
const repoPath = uri.repoPath || this.git.repoPath;
if (repoPath) {
const remotes = await this.git.getRemotes(repoPath);