Commit a7436a3 1 parent 96f7001 commit a7436a3 Copy full SHA for a7436a3
File tree 1 file changed +7
-2
lines changed
src/env/node/git/sub-providers
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
parseGitLogSimpleFormat ,
24
24
parseGitLogSimpleRenamed ,
25
25
} from '../../../../git/parsers/logParser' ;
26
- import { isUncommittedStaged } from '../../../../git/utils/revision.utils' ;
26
+ import { isRevisionRange , isUncommittedStaged } from '../../../../git/utils/revision.utils' ;
27
27
import { showGenericErrorMessage } from '../../../../messages' ;
28
28
import { configuration } from '../../../../system/-webview/configuration' ;
29
29
import { splitPath } from '../../../../system/-webview/path' ;
@@ -53,7 +53,12 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
53
53
54
54
const args : string [ ] = [ ] ;
55
55
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
+ }
57
62
}
58
63
59
64
try {
You can’t perform that action at this time.
0 commit comments