@@ -1549,6 +1549,12 @@ export class ViewCommands implements Disposable {
1549
1549
const nodeUri = await this . container . git . getBestRevisionUri ( node . repoPath , node . file . path , node . ref . ref ) ;
1550
1550
if ( nodeUri == null ) return Promise . resolve ( ) ;
1551
1551
1552
+ const input1 : MergeEditorInputs [ 'input1' ] = {
1553
+ uri : nodeUri ,
1554
+ title : `Incoming` ,
1555
+ detail : ` ${ node . ref . name } ` ,
1556
+ } ;
1557
+
1552
1558
const [ mergeBaseResult , workingUriResult ] = await Promise . allSettled ( [
1553
1559
repo . git . refs ( ) . getMergeBase ( node . ref . ref , 'HEAD' ) ,
1554
1560
this . container . git . getWorkingUri ( node . repoPath , node . uri ) ,
@@ -1560,6 +1566,20 @@ export class ViewCommands implements Disposable {
1560
1566
return Promise . resolve ( ) ;
1561
1567
}
1562
1568
1569
+ const input2 : MergeEditorInputs [ 'input2' ] = {
1570
+ uri : workingUri ,
1571
+ title : 'Current' ,
1572
+ detail : ' Working Tree' ,
1573
+ } ;
1574
+
1575
+ const headUri = await this . container . git . getBestRevisionUri ( node . repoPath , node . file . path , 'HEAD' ) ;
1576
+ if ( headUri != null ) {
1577
+ const branch = await repo . git . branches ( ) . getBranch ?.( ) ;
1578
+
1579
+ input2 . uri = headUri ;
1580
+ input2 . detail = ` ${ branch ?. name || 'HEAD' } ` ;
1581
+ }
1582
+
1563
1583
const mergeBase = getSettledValue ( mergeBaseResult ) ;
1564
1584
const baseUri =
1565
1585
mergeBase != null
@@ -1568,14 +1588,8 @@ export class ViewCommands implements Disposable {
1568
1588
1569
1589
const inputs : MergeEditorInputs = {
1570
1590
base : baseUri ?? nodeUri ,
1571
- input1 : {
1572
- uri : nodeUri ,
1573
- title : node . ref . name ,
1574
- } ,
1575
- input2 : {
1576
- uri : workingUri ,
1577
- title : 'Working Tree' ,
1578
- } ,
1591
+ input1 : input1 ,
1592
+ input2 : input2 ,
1579
1593
output : workingUri ,
1580
1594
} ;
1581
1595
0 commit comments