mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-28 17:25:09 -05:00
Adds a file history explorer view
This commit is contained in:
@@ -14,11 +14,11 @@ export class FileHistoryNode extends ExplorerNode {
|
||||
super(uri);
|
||||
}
|
||||
|
||||
async getChildren(): Promise<CommitNode[]> {
|
||||
async getChildren(): Promise<ExplorerNode[]> {
|
||||
const log = await this.git.getLogForFile(this.uri.repoPath, this.uri.fsPath, this.uri.sha);
|
||||
if (log === undefined) return [];
|
||||
if (log === undefined) return [new TextExplorerNode('No file history')];
|
||||
|
||||
return [...Iterables.map(log.commits.values(), c => new CommitNode(c, this.git.config.gitExplorer.commitFormat, this.context, this.git))];
|
||||
return [...Iterables.map(log.commits.values(), c => new CommitNode(c, this.git.config.fileHistoryExplorer.commitFormat, this.context, this.git))];
|
||||
}
|
||||
|
||||
getTreeItem(): TreeItem {
|
||||
|
||||
Reference in New Issue
Block a user