mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-17 02:51:47 -05:00
Fixes issue where work tree files could no show up
This commit is contained in:
@@ -22,20 +22,18 @@ export class StatusFilesNode extends ExplorerNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getChildren(): Promise<ExplorerNode[]> {
|
async getChildren(): Promise<ExplorerNode[]> {
|
||||||
let statuses: IGitStatusFileWithCommit[];
|
let statuses: IGitStatusFileWithCommit[] = [];
|
||||||
|
|
||||||
let log: GitLog | undefined;
|
let log: GitLog | undefined;
|
||||||
if (this.range !== undefined) {
|
if (this.range !== undefined) {
|
||||||
log = await this.git.getLogForRepo(this.status.repoPath, this.range, this.maxCount);
|
log = await this.git.getLogForRepo(this.status.repoPath, this.range, this.maxCount);
|
||||||
if (log === undefined) return [];
|
if (log !== undefined) {
|
||||||
|
statuses = Array.from(Iterables.flatMap(log.commits.values(), c => {
|
||||||
statuses = Array.from(Iterables.flatMap(log.commits.values(), c => {
|
return c.fileStatuses.map(s => {
|
||||||
return c.fileStatuses.map(s => {
|
return { ...s, commit: c } as IGitStatusFileWithCommit;
|
||||||
return { ...s, commit: c } as IGitStatusFileWithCommit;
|
});
|
||||||
});
|
}));
|
||||||
}));
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
statuses = [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.status.files.length !== 0 && this.includeWorkingTree) {
|
if (this.status.files.length !== 0 && this.includeWorkingTree) {
|
||||||
|
|||||||
Reference in New Issue
Block a user