Adds new command to show quick commit info

This commit is contained in:
Eric Amodio
2017-02-10 04:09:00 -05:00
parent 615f55574b
commit e12ec7093c
8 changed files with 139 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ export default class Git {
params.push(`-n${maxCount}`);
}
if (sha) {
params.push(`origin..${sha}`);
params.push(sha);
params.push(`--`);
}
@@ -111,18 +111,21 @@ export default class Git {
}
if (sha) {
params.push(`--follow`);
params.push(`origin..${sha}`);
params.push(sha);
}
params.push(`-L ${start},${end}:${file}`);
return gitCommand(root, ...params);
}
static logRepo(repoPath: string, maxCount?: number) {
static logRepo(repoPath: string, sha?: string, maxCount?: number) {
const params = [...DefaultLogParams];
if (maxCount) {
params.push(`-n${maxCount}`);
}
if (sha) {
params.push(`${sha}^!`);
}
return gitCommand(repoPath, ...params);
}