Skip to content

Commit f64238f

Browse files
committed
fix: use rootUri instead of _rootUri
1 parent 0a4179d commit f64238f

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/extension.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,18 @@ function _validateFoundRepos(git: API) {
2727
}
2828

2929
/**
30-
* Run autofill against one of multiples in the workspace.
31-
*
32-
* This is a rare flow.
30+
* Run autofill against one of multiples in the workspace or when using GitLens on a single repo.
3331
*
3432
* @param sourceControl Of type `vscode.SourceControl` with public `.rootUri`
35-
* and private `.rootUri`.
33+
* and private `._rootUri` (the latter is not set when using GitLens).
3634
*/
3735
async function _handleRepos(git: API, sourceControl: any) {
3836
// FIXME: Unfortunately this seems to only pick up the first repo and not find
3937
// second, etc.
4038
const selectedRepo = git.repositories.find(repository => {
41-
const uri = sourceControl._rootUri;
39+
const uri = sourceControl.rootUri;
4240
if (!uri) {
43-
console.warn("_rootUri not set");
41+
console.warn("rootUri not set on VS Code source control");
4442
}
4543
return repository.rootUri.path === uri.path;
4644
});

0 commit comments

Comments
 (0)