From c7e0c6a13a63cd40d600d68e0f7b89e68b98e66e Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 11 Jan 2018 21:40:16 -0500 Subject: [PATCH] Avoids git call on already tracked documents --- src/gitService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gitService.ts b/src/gitService.ts index f499de4..225cdbb 100644 --- a/src/gitService.ts +++ b/src/gitService.ts @@ -361,7 +361,10 @@ export class GitService extends Disposable { editor = editor || window.activeTextEditor; if (editor === undefined) return undefined; - return this.getRepoPath(editor.document.uri); + const doc = await Container.tracker.getOrAdd(editor.document.uri); + if (doc === undefined) return undefined; + + return doc.uri.repoPath; } getHighlanderRepoPath(): string | undefined {