mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-16 09:35:40 -05:00
Adds diff info to the active line hover for uncommitted changes
This commit is contained in:
@@ -9,6 +9,7 @@ import * as tmp from 'tmp';
|
||||
export { IGit };
|
||||
export * from './models/models';
|
||||
export * from './parsers/blameParser';
|
||||
export * from './parsers/diffParser';
|
||||
export * from './parsers/logParser';
|
||||
export * from './parsers/stashParser';
|
||||
export * from './parsers/statusParser';
|
||||
@@ -160,6 +161,18 @@ export class Git {
|
||||
}
|
||||
}
|
||||
|
||||
static diff(repoPath: string, fileName: string, sha1?: string, sha2?: string) {
|
||||
const params = [`diff`, `--diff-filter=M`, `-M`];
|
||||
if (sha1) {
|
||||
params.push(sha1);
|
||||
}
|
||||
if (sha2) {
|
||||
params.push(sha2);
|
||||
}
|
||||
|
||||
return gitCommand(repoPath, ...params, '--', fileName);
|
||||
}
|
||||
|
||||
static diff_nameStatus(repoPath: string, sha1?: string, sha2?: string) {
|
||||
const params = [`diff`, `--name-status`, `-M`];
|
||||
if (sha1) {
|
||||
|
||||
Reference in New Issue
Block a user