Adds diff info to the active line hover for uncommitted changes

This commit is contained in:
Eric Amodio
2017-05-22 16:16:17 -04:00
parent ff1597d64f
commit 19e523d6e4
6 changed files with 208 additions and 13 deletions

View File

@@ -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) {