@@ -102,13 +102,19 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
102
102
}
103
103
104
104
async provideHistoryItemChanges ( historyItemId : string ) : Promise < SourceControlHistoryItemChange [ ] > {
105
- const [ ref1 , ref2 ] = historyItemId . includes ( '..' )
106
- ? historyItemId . split ( '..' )
107
- : [ `${ historyItemId } ^` , historyItemId ] ;
105
+ // The "All Changes" history item uses a special id
106
+ // which is a commit range instead of a single commit id
107
+ let [ originalRef , modifiedRef ] = historyItemId . includes ( '..' )
108
+ ? historyItemId . split ( '..' ) : [ undefined , historyItemId ] ;
109
+
110
+ if ( ! originalRef ) {
111
+ const commit = await this . repository . getCommit ( modifiedRef ) ;
112
+ originalRef = commit . parents . length > 0 ? commit . parents [ 0 ] : `${ modifiedRef } ^` ;
113
+ }
108
114
109
115
const historyItemChangesUri : Uri [ ] = [ ] ;
110
116
const historyItemChanges : SourceControlHistoryItemChange [ ] = [ ] ;
111
- const changes = await this . repository . diffBetween ( ref1 , ref2 ) ;
117
+ const changes = await this . repository . diffBetween ( originalRef , modifiedRef ) ;
112
118
113
119
for ( const change of changes ) {
114
120
const historyItemUri = change . uri . with ( {
@@ -118,8 +124,8 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
118
124
// History item change
119
125
historyItemChanges . push ( {
120
126
uri : historyItemUri ,
121
- originalUri : toGitUri ( change . originalUri , ref1 ) ,
122
- modifiedUri : toGitUri ( change . originalUri , ref2 ) ,
127
+ originalUri : toGitUri ( change . originalUri , originalRef ) ,
128
+ modifiedUri : toGitUri ( change . originalUri , modifiedRef ) ,
123
129
renameUri : change . renameUri ,
124
130
} ) ;
125
131
0 commit comments