File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/env/node/git/sub-providers Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
2323 parseGitLogSimpleFormat ,
2424 parseGitLogSimpleRenamed ,
2525} from '../../../../git/parsers/logParser' ;
26- import { isUncommittedStaged } from '../../../../git/utils/revision.utils' ;
26+ import { isRevisionRange , isUncommittedStaged } from '../../../../git/utils/revision.utils' ;
2727import { showGenericErrorMessage } from '../../../../messages' ;
2828import { configuration } from '../../../../system/-webview/configuration' ;
2929import { splitPath } from '../../../../system/-webview/path' ;
@@ -53,7 +53,12 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
5353
5454 const args : string [ ] = [ ] ;
5555 if ( to != null ) {
56- prepareToFromDiffArgs ( to , from , args ) ;
56+ // Handle revision ranges specially if there is no `from`, otherwise `prepareToFromDiffArgs` will duplicate the range
57+ if ( isRevisionRange ( to ) && from == null ) {
58+ args . push ( to ) ;
59+ } else {
60+ prepareToFromDiffArgs ( to , from , args ) ;
61+ }
5762 }
5863
5964 try {
You can’t perform that action at this time.
0 commit comments