mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-28 17:25:09 -05:00
Adds CodeLens for Diff'ing in blame
Other fixes and refactoring
This commit is contained in:
@@ -18,9 +18,14 @@ export default class Git {
|
||||
return gitCommand(cwd, 'rev-parse', '--show-toplevel').then(data => data.replace(/\r?\n|\r/g, ''));
|
||||
}
|
||||
|
||||
static blame(fileName: string, repoPath: string) {
|
||||
static blame(fileName: string, repoPath: string, sha?: string) {
|
||||
fileName = Git.normalizePath(fileName, repoPath);
|
||||
|
||||
if (sha) {
|
||||
console.log('git', 'blame', '-fnw', '--root', `${sha}^`, '--', fileName);
|
||||
return gitCommand(repoPath, 'blame', '-fnw', '--root', `${sha}^`, '--', fileName);
|
||||
}
|
||||
|
||||
console.log('git', 'blame', '-fnw', '--root', '--', fileName);
|
||||
return gitCommand(repoPath, 'blame', '-fnw', '--root', '--', fileName);
|
||||
// .then(s => { console.log(s); return s; })
|
||||
|
||||
Reference in New Issue
Block a user