File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,13 @@ export class StatusFilesNode extends ExplorerNode {
6161 }
6262
6363 async getTreeItem ( ) : Promise < TreeItem > {
64+ // Start with any untracked files, since they won't be included in the next call
65+ let files = ( this . status . files === undefined ) ? 0 : this . status . files . filter ( s => s . status === '?' ) . length ;
66+
6467 const stats = await this . git . getChangedFilesCount ( this . status . repoPath , this . git . config . insiders ? this . status . upstream : this . range ) ;
65- const files = ( stats === undefined ) ? 0 : stats . files ;
68+ if ( stats !== undefined ) {
69+ files += stats . files ;
70+ }
6671
6772 const label = `${ files } file${ files > 1 ? 's' : '' } changed` ; // ${this.status.upstream === undefined ? '' : ` (ahead of ${this.status.upstream})` }`;
6873 const item = new TreeItem ( label , TreeItemCollapsibleState . Collapsed ) ;
You can’t perform that action at this time.
0 commit comments