mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Git - pass the similarityThreshold to git diff-tree (#238367)
This commit is contained in:
@@ -1592,8 +1592,14 @@ export class Repository {
|
||||
return parseGitChanges(this.repositoryRoot, gitResult.stdout);
|
||||
}
|
||||
|
||||
async diffTrees(treeish1: string, treeish2?: string): Promise<Change[]> {
|
||||
const args = ['diff-tree', '-r', '--name-status', '-z', '--diff-filter=ADMR', treeish1];
|
||||
async diffTrees(treeish1: string, treeish2?: string, options?: { similarityThreshold?: number }): Promise<Change[]> {
|
||||
const args = ['diff-tree', '-r', '--name-status', '-z', '--diff-filter=ADMR'];
|
||||
|
||||
if (options?.similarityThreshold) {
|
||||
args.push(`--find-renames=${options.similarityThreshold}%`);
|
||||
}
|
||||
|
||||
args.push(treeish1);
|
||||
|
||||
if (treeish2) {
|
||||
args.push(treeish2);
|
||||
|
||||
Reference in New Issue
Block a user