@@ -19,6 +19,7 @@ import { log } from '../../../../system/decorators/log';
1919import { Logger } from '../../../../system/logger' ;
2020import { getLogScope } from '../../../../system/logger.scope' ;
2121import { joinPaths , normalizePath } from '../../../../system/path' ;
22+ import { getSettledValue } from '../../../../system/promise' ;
2223import { interpolate } from '../../../../system/string' ;
2324import type { Git } from '../git' ;
2425import { GitErrors } from '../git' ;
@@ -101,12 +102,17 @@ export class WorktreesGitSubProvider implements GitWorktreesSubProvider {
101102 if ( worktrees == null ) {
102103 async function load ( this : WorktreesGitSubProvider ) {
103104 try {
104- const [ data , branches ] = await Promise . all ( [
105+ const [ dataResult , branchesResult ] = await Promise . allSettled ( [
105106 this . git . exec ( { cwd : repoPath } , 'worktree' , 'list' , '--porcelain' ) ,
106107 this . provider . branches . getBranches ( repoPath ) ,
107108 ] ) ;
108109
109- return parseGitWorktrees ( this . container , data , repoPath , branches . values ) ;
110+ return parseGitWorktrees (
111+ this . container ,
112+ getSettledValue ( dataResult , '' ) ,
113+ repoPath ,
114+ getSettledValue ( branchesResult ) ?. values ?? [ ] ,
115+ ) ;
110116 } catch ( ex ) {
111117 this . cache . worktrees ?. delete ( repoPath ) ;
112118
0 commit comments