mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-22 19:29:17 +00:00
Git - use diff instead of diff-tree for showing commit data and comparing branches (#273969)
This commit is contained in:
@@ -3145,7 +3145,7 @@ export class CommandCenter {
|
||||
const sourceCommit = sourceRef.ref.commit;
|
||||
|
||||
try {
|
||||
const changes = await repository.diffTrees(sourceCommit, historyItem.id);
|
||||
const changes = await repository.diffBetween2(sourceCommit, historyItem.id);
|
||||
|
||||
if (changes.length === 0) {
|
||||
window.showInformationMessage(l10n.t('The selected references have no differences.'));
|
||||
@@ -3203,7 +3203,7 @@ export class CommandCenter {
|
||||
}
|
||||
|
||||
try {
|
||||
const changes = await repository.diffTrees(ref1.id, ref2.id);
|
||||
const changes = await repository.diffBetween2(ref1.id, ref2.id);
|
||||
|
||||
if (changes.length === 0) {
|
||||
window.showInformationMessage(l10n.t('There are no changes between "{0}" and "{1}".', ref1.name, ref2.name));
|
||||
@@ -4897,7 +4897,7 @@ export class CommandCenter {
|
||||
|
||||
const commit = await repository.getCommit(item.ref);
|
||||
const commitParentId = commit.parents.length > 0 ? commit.parents[0] : await repository.getEmptyTree();
|
||||
const changes = await repository.diffTrees(commitParentId, commit.hash);
|
||||
const changes = await repository.diffBetween2(commitParentId, commit.hash);
|
||||
const resources = changes.map(c => toMultiFileDiffEditorUris(c, commitParentId, commit.hash));
|
||||
|
||||
const title = `${item.shortRef} - ${subject(commit.message)}`;
|
||||
@@ -5171,7 +5171,7 @@ export class CommandCenter {
|
||||
|
||||
const multiDiffSourceUri = Uri.from({ scheme: 'scm-history-item', path: `${repository.root}/${historyItemParentId}..${historyItemId}` });
|
||||
|
||||
const changes = await repository.diffTrees(historyItemParentId, historyItemId);
|
||||
const changes = await repository.diffBetween2(historyItemParentId, historyItemId);
|
||||
const resources = changes.map(c => toMultiFileDiffEditorUris(c, historyItemParentId, historyItemId));
|
||||
const reveal = revealUri ? { modifiedUri: toGitUri(revealUri, historyItemId) } : undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user