Skip to content

Commit 467eef9

Browse files
committed
Sets titles to yours and theirs in the git extension & swaps order. Fixes microsoft#150853
1 parent 14f21ac commit 467eef9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

extensions/git/src/commands.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -417,20 +417,20 @@ export class CommandCenter {
417417
}
418418

419419

420-
type InputData = { uri: Uri; detail?: string; description?: string };
420+
type InputData = { uri: Uri; title?: string; detail?: string; description?: string };
421421
const mergeUris = toMergeUris(uri);
422-
const input1: InputData = { uri: mergeUris.ours };
423-
const input2: InputData = { uri: mergeUris.theirs };
422+
const ours: InputData = { uri: mergeUris.ours, title: localize('Yours', 'Yours') };
423+
const theirs: InputData = { uri: mergeUris.theirs, title: localize('Theirs', 'Theirs') };
424424

425425
try {
426426
const [head, mergeHead] = await Promise.all([repo.getCommit('HEAD'), repo.getCommit('MERGE_HEAD')]);
427427
// ours (current branch and commit)
428-
input1.detail = head.refNames.map(s => s.replace(/^HEAD ->/, '')).join(', ');
429-
input1.description = head.hash.substring(0, 7);
428+
ours.detail = head.refNames.map(s => s.replace(/^HEAD ->/, '')).join(', ');
429+
ours.description = head.hash.substring(0, 7);
430430

431431
// theirs
432-
input2.detail = mergeHead.refNames.join(', ');
433-
input2.description = mergeHead.hash.substring(0, 7);
432+
theirs.detail = mergeHead.refNames.join(', ');
433+
theirs.description = mergeHead.hash.substring(0, 7);
434434

435435
} catch (error) {
436436
// not so bad, can continue with just uris
@@ -440,8 +440,8 @@ export class CommandCenter {
440440

441441
const options = {
442442
ancestor: mergeUris.base,
443-
input1,
444-
input2,
443+
input1: theirs,
444+
input2: ours,
445445
output: uri
446446
};
447447

0 commit comments

Comments
 (0)