107
const workspaceFolders = this.getWorkspaceFolders();
108
if (includeParents) {
110
>
const userHome = await this.pathService.userHome();
111
>
for (const workspaceFolder of workspaceFolders) {
112
>
roots.add(workspaceFolder.uri);
113
>
// Walk up from the workspace folder to find the repository root
114
>
// (.git folder). Only include parent folders if a repo root is
115
>
// actually found; otherwise keep only the workspace folder.
116
>
const parents = await this.findParentRepoFolders(workspaceFolder.uri, userHome, roots, logger);
117
>
for (const parent of parents) {
118
roots.add(parent);
119
}
121
>
return [...roots];
122
>
}
123
return workspaceFolders.map(f => f.uri);
124
}