mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
Git - tweak git blame computation (#234386)
* Helper methods * Finished implementing the prototype * Command handled model creation/disposal * Cache staged resources diff information
This commit is contained in:
@@ -2207,9 +2207,16 @@ export class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
async blame2(path: string): Promise<BlameInformation[] | undefined> {
|
||||
async blame2(path: string, ref?: string): Promise<BlameInformation[] | undefined> {
|
||||
try {
|
||||
const args = ['blame', '--root', '--incremental', '--', sanitizePath(path)];
|
||||
const args = ['blame', '--root', '--incremental'];
|
||||
|
||||
if (ref) {
|
||||
args.push(ref);
|
||||
}
|
||||
|
||||
args.push('--', sanitizePath(path));
|
||||
|
||||
const result = await this.exec(args);
|
||||
|
||||
return parseGitBlame(result.stdout.trim());
|
||||
|
||||
Reference in New Issue
Block a user