mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-14 10:03:15 -05:00
Attempted fix for bad filename to diff w/ working
Tried to find the most recent filename given a commit, but git doesn't seem to want to cooperate
This commit is contained in:
@@ -87,7 +87,7 @@ export default class Git {
|
||||
return gitCommand(root, ...params, `--`, file);
|
||||
}
|
||||
|
||||
static log(fileName: string, sha?: string, repoPath?: string, maxCount?: number) {
|
||||
static log(fileName: string, sha?: string, repoPath?: string, maxCount?: number, reverse: boolean = false) {
|
||||
const [file, root]: [string, string] = Git.splitPath(Git.normalizePath(fileName), repoPath);
|
||||
|
||||
const params = [...DefaultLogParams, `--follow`];
|
||||
@@ -95,7 +95,12 @@ export default class Git {
|
||||
params.push(`-n${maxCount}`);
|
||||
}
|
||||
if (sha) {
|
||||
params.push(sha);
|
||||
if (reverse) {
|
||||
params.push(`${sha}..HEAD`);
|
||||
}
|
||||
else {
|
||||
params.push(sha);
|
||||
}
|
||||
params.push(`--`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user