Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.

Commit 429e19f

Browse files
committed
fix: delete dead code
1 parent bc84f57 commit 429e19f

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

src/file-system/SourcegraphTreeDataProvider.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ export class SourcegraphTreeDataProvider implements vscode.TreeDataProvider<stri
5353
let ancestor: string | undefined = uri.repositoryUri()
5454
let children = await this.getChildren(ancestor)
5555
while (ancestor) {
56-
for (const childName of children || []) {
57-
log.appendLine(`child=${childName}`)
58-
}
5956
const isParent = children?.includes(uriString)
6057
if (isParent) {
6158
break
@@ -70,13 +67,7 @@ export class SourcegraphTreeDataProvider implements vscode.TreeDataProvider<stri
7067
}
7168
children = await this.getChildren(ancestor)
7269
}
73-
log.appendLine(`getParent(${uriString || 'undefined'}) ancestor=${ancestor || 'undefined'}`)
7470
return ancestor
75-
// let parentUri = SourcegraphUri.parse(uriString).parentUri()
76-
// while (parentUri && !this.treeItemCache.has(parentUri)) {
77-
// parentUri = SourcegraphUri.parse(parentUri).parentUri()
78-
// }
79-
// return parentUri
8071
}
8172

8273
public async getChildren(uriString?: string): Promise<string[] | undefined> {
@@ -164,38 +155,6 @@ export class SourcegraphTreeDataProvider implements vscode.TreeDataProvider<stri
164155
return `${uri.repositoryName}${uri.revisionPart()}`
165156
}
166157

167-
// private collapsibleState(uri: SourcegraphUri): vscode.TreeItemCollapsibleState {
168-
// if (uri.isFile()) {
169-
// return vscode.TreeItemCollapsibleState.None
170-
// }
171-
// const parentUri = uri.parentUri()
172-
// if (parentUri && this.treeItemCache.get(parentUri) === 1) {
173-
// return vscode.TreeItemCollapsibleState.Expanded
174-
// }
175-
// return vscode.TreeItemCollapsibleState.Collapsed
176-
// }
177-
// if (uri.isFile()) {
178-
// return vscode.TreeItemCollapsibleState.None
179-
// }
180-
// const parentUri = uri.parentUri()
181-
// let result = vscode.TreeItemCollapsibleState.Collapsed
182-
// if (parentUri) {
183-
// const parent = SourcegraphUri.parse(parentUri)
184-
// const tree = await this.fs.getFileTree(parent)
185-
// const fromCache = this.directChildrenCount.get(parentUri)
186-
// if (fromCache) {
187-
// return fromCache
188-
// }
189-
// if (parent.path) {
190-
// const directChildren = tree.directChildren(parent.path)
191-
// if (directChildren && directChildren.length === 1) {
192-
// result = vscode.TreeItemCollapsibleState.Expanded
193-
// }
194-
// }
195-
// this.directChildrenCount.set(parentUri, result)
196-
// }
197-
// return result
198-
// }
199158
private newTreeItem(
200159
uri: SourcegraphUri,
201160
parent: SourcegraphUri | undefined,

0 commit comments

Comments
 (0)