@@ -17,9 +17,6 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
1717 private readonly _onDidChangeCurrentHistoryItemGroup = new EventEmitter < void > ( ) ;
1818 readonly onDidChangeCurrentHistoryItemGroup : Event < void > = this . _onDidChangeCurrentHistoryItemGroup . event ;
1919
20- private readonly _onDidChangeCurrentHistoryItemGroupBase = new EventEmitter < void > ( ) ;
21- readonly onDidChangeCurrentHistoryItemGroupBase : Event < void > = this . _onDidChangeCurrentHistoryItemGroupBase . event ;
22-
2320 private readonly _onDidChangeDecorations = new EventEmitter < Uri [ ] > ( ) ;
2421 readonly onDidChangeFileDecorations : Event < Uri [ ] > = this . _onDidChangeDecorations . event ;
2522
@@ -29,8 +26,6 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
2926 set currentHistoryItemGroup ( value : SourceControlHistoryItemGroup | undefined ) {
3027 this . _currentHistoryItemGroup = value ;
3128 this . _onDidChangeCurrentHistoryItemGroup . fire ( ) ;
32-
33- this . logger . trace ( 'GitHistoryProvider:onDidRunGitStatus - currentHistoryItemGroup:' , JSON . stringify ( value ) ) ;
3429 }
3530
3631 private historyItemDecorations = new Map < string , FileDecoration > ( ) ;
@@ -59,12 +54,13 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
5954 return ;
6055 }
6156
57+ this . _HEAD = this . repository . HEAD ;
58+
6259 // Check if HEAD does not support incoming/outgoing (detached commit, tag)
6360 if ( ! this . repository . HEAD ?. name || ! this . repository . HEAD ?. commit || this . repository . HEAD . type === RefType . Tag ) {
6461 this . logger . trace ( 'GitHistoryProvider:onDidRunGitStatus - HEAD does not support incoming/outgoing' ) ;
6562
6663 this . currentHistoryItemGroup = undefined ;
67- this . _HEAD = this . repository . HEAD ;
6864 return ;
6965 }
7066
@@ -78,16 +74,7 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
7874 } : undefined
7975 } ;
8076
81- // Check if Upstream has changed
82- if ( force ||
83- this . _HEAD ?. upstream ?. name !== this . repository . HEAD ?. upstream ?. name ||
84- this . _HEAD ?. upstream ?. remote !== this . repository . HEAD ?. upstream ?. remote ||
85- this . _HEAD ?. upstream ?. commit !== this . repository . HEAD ?. upstream ?. commit ) {
86- this . logger . trace ( `GitHistoryProvider:onDidRunGitStatus - Upstream has changed (${ force } )` ) ;
87- this . _onDidChangeCurrentHistoryItemGroupBase . fire ( ) ;
88- }
89-
90- this . _HEAD = this . repository . HEAD ;
77+ this . logger . trace ( `GitHistoryProvider:onDidRunGitStatus - currentHistoryItemGroup (${ force } ): ${ JSON . stringify ( this . currentHistoryItemGroup ) } ` ) ;
9178 }
9279
9380 async provideHistoryItems ( historyItemGroupId : string , options : SourceControlHistoryOptions ) : Promise < SourceControlHistoryItem [ ] > {
0 commit comments