@@ -2995,13 +2995,13 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
29952995 } else if ( isSCMActionButton ( inputOrElement ) ) {
29962996 return false ;
29972997 } else if ( isSCMResourceGroup ( inputOrElement ) ) {
2998- return inputOrElement . resources . length > 0 ;
2998+ return true ;
29992999 } else if ( isSCMResource ( inputOrElement ) ) {
30003000 return false ;
30013001 } else if ( ResourceTree . isResourceNode ( inputOrElement ) ) {
30023002 return inputOrElement . childrenCount > 0 ;
30033003 } else if ( isSCMHistoryItemGroupTreeElement ( inputOrElement ) ) {
3004- return ( inputOrElement . count ?? 0 ) > 0 ;
3004+ return true ;
30053005 } else if ( isSCMHistoryItemTreeElement ( inputOrElement ) ) {
30063006 return true ;
30073007 } else if ( isSCMHistoryItemChangeTreeElement ( inputOrElement ) ) {
@@ -3042,6 +3042,7 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
30423042 }
30433043
30443044 // ResourceGroups
3045+ const showWheEmpty = resourceGroups . some ( group => ! group . hideWhenEmpty ) ;
30453046 const hasSomeChanges = resourceGroups . some ( group => group . resources . length > 0 ) ;
30463047 if ( hasSomeChanges || ( repositoryCount === 1 && ( ! showActionButton || ! actionButton ) ) ) {
30473048 children . push ( ...resourceGroups ) ;
@@ -3051,7 +3052,7 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
30513052 const historyItemGroups = await this . getHistoryItemGroups ( inputOrElement ) ;
30523053
30533054 // Incoming/Outgoing Separator
3054- if ( hasSomeChanges && historyItemGroups . length > 0 ) {
3055+ if ( historyItemGroups . length > 0 && ( hasSomeChanges || showWheEmpty ) ) {
30553056 children . push ( {
30563057 label : localize ( 'syncSeparatorHeader' , "Incoming/Outgoing" ) ,
30573058 repository : inputOrElement ,
0 commit comments