Skip to content

Commit c7e0c6a

Browse files
committed
Avoids git call on already tracked documents
1 parent 5179f85 commit c7e0c6a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gitService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@ export class GitService extends Disposable {
361361
editor = editor || window.activeTextEditor;
362362
if (editor === undefined) return undefined;
363363

364-
return this.getRepoPath(editor.document.uri);
364+
const doc = await Container.tracker.getOrAdd(editor.document.uri);
365+
if (doc === undefined) return undefined;
366+
367+
return doc.uri.repoPath;
365368
}
366369

367370
getHighlanderRepoPath(): string | undefined {

0 commit comments

Comments
 (0)