@@ -3,7 +3,7 @@ import * as paths from 'path';
33import { commands , TextDocumentShowOptions , TextEditor , Uri } from 'vscode' ;
44import { GlyphChars } from '../constants' ;
55import { Container } from '../container' ;
6- import { GitUri } from '../git/gitService' ;
6+ import { GitService , GitUri } from '../git/gitService' ;
77import { Messages } from '../messages' ;
88import { BranchesAndTagsQuickPick , CommandQuickPickItem } from '../quickpicks' ;
99import { Strings } from '../system' ;
@@ -59,7 +59,7 @@ export class DiffWithBranchCommand extends ActiveEditorCommand {
5959 const rename = files . find ( s => s . fileName === fileName ) ;
6060 if ( rename !== undefined && rename . originalFileName !== undefined ) {
6161 renamedUri = GitUri . resolveToUri ( rename . originalFileName , gitUri . repoPath ) ;
62- renamedTitle = `${ paths . basename ( rename . originalFileName ) } (${ ref } )` ;
62+ renamedTitle = `${ paths . basename ( rename . originalFileName ) } (${ GitService . shortenSha ( ref ) } )` ;
6363 }
6464 }
6565
@@ -68,7 +68,7 @@ export class DiffWithBranchCommand extends ActiveEditorCommand {
6868 lhs : {
6969 sha : pick . remote ? `remotes/${ ref } ` : ref ,
7070 uri : renamedUri || ( gitUri as Uri ) ,
71- title : renamedTitle || `${ paths . basename ( gitUri . fsPath ) } (${ ref } )`
71+ title : renamedTitle || `${ paths . basename ( gitUri . fsPath ) } (${ GitService . shortenSha ( ref ) } )`
7272 } ,
7373 rhs : {
7474 sha : '' ,
0 commit comments