@@ -2995,13 +2995,13 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
2995
2995
} else if ( isSCMActionButton ( inputOrElement ) ) {
2996
2996
return false ;
2997
2997
} else if ( isSCMResourceGroup ( inputOrElement ) ) {
2998
- return inputOrElement . resources . length > 0 ;
2998
+ return true ;
2999
2999
} else if ( isSCMResource ( inputOrElement ) ) {
3000
3000
return false ;
3001
3001
} else if ( ResourceTree . isResourceNode ( inputOrElement ) ) {
3002
3002
return inputOrElement . childrenCount > 0 ;
3003
3003
} else if ( isSCMHistoryItemGroupTreeElement ( inputOrElement ) ) {
3004
- return ( inputOrElement . count ?? 0 ) > 0 ;
3004
+ return true ;
3005
3005
} else if ( isSCMHistoryItemTreeElement ( inputOrElement ) ) {
3006
3006
return true ;
3007
3007
} else if ( isSCMHistoryItemChangeTreeElement ( inputOrElement ) ) {
@@ -3042,6 +3042,7 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
3042
3042
}
3043
3043
3044
3044
// ResourceGroups
3045
+ const showWheEmpty = resourceGroups . some ( group => ! group . hideWhenEmpty ) ;
3045
3046
const hasSomeChanges = resourceGroups . some ( group => group . resources . length > 0 ) ;
3046
3047
if ( hasSomeChanges || ( repositoryCount === 1 && ( ! showActionButton || ! actionButton ) ) ) {
3047
3048
children . push ( ...resourceGroups ) ;
@@ -3051,7 +3052,7 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
3051
3052
const historyItemGroups = await this . getHistoryItemGroups ( inputOrElement ) ;
3052
3053
3053
3054
// Incoming/Outgoing Separator
3054
- if ( hasSomeChanges && historyItemGroups . length > 0 ) {
3055
+ if ( historyItemGroups . length > 0 && ( hasSomeChanges || showWheEmpty ) ) {
3055
3056
children . push ( {
3056
3057
label : localize ( 'syncSeparatorHeader' , "Incoming/Outgoing" ) ,
3057
3058
repository : inputOrElement ,
0 commit comments