@@ -89,12 +89,12 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
8989 repoPath : string ,
9090 to : string ,
9191 from ?: string ,
92- options ?: { context ?: number ; includeUntracked : boolean ; uris ?: Uri [ ] } ,
92+ options ?: { context ?: number ; includeUntracked : boolean ; uris ?: Uri [ ] ; notation ?: '..' | '...' } ,
9393 ) : Promise < GitDiff | undefined > {
9494 const scope = getLogScope ( ) ;
9595 const args = [ `-U${ options ?. context ?? 3 } ` ] ;
9696
97- from = prepareToFromDiffArgs ( to , from , args ) ;
97+ from = prepareToFromDiffArgs ( to , from , args , options ?. notation ) ;
9898
9999 let paths : Set < string > | undefined ;
100100 let untrackedPaths : string [ ] | undefined ;
@@ -630,7 +630,7 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
630630 }
631631 }
632632}
633- function prepareToFromDiffArgs ( to : string , from : string | undefined , args : string [ ] ) {
633+ function prepareToFromDiffArgs ( to : string , from : string | undefined , args : string [ ] , notation ?: '..' | '...' ) : string {
634634 if ( to === uncommitted ) {
635635 if ( from != null ) {
636636 args . push ( from ) ;
@@ -656,6 +656,8 @@ function prepareToFromDiffArgs(to: string, from: string | undefined, args: strin
656656 }
657657 } else if ( to === '' ) {
658658 args . push ( from ) ;
659+ } else if ( notation != null ) {
660+ args . push ( `${ from } ${ notation } ${ to } ` ) ;
659661 } else {
660662 args . push ( from , to ) ;
661663 }
0 commit comments