|
@ -154,11 +154,13 @@ export default class Git { |
|
|
const [file, root]: [string, string] = Git.splitPath(Git.normalizePath(fileName), repoPath); |
|
|
const [file, root]: [string, string] = Git.splitPath(Git.normalizePath(fileName), repoPath); |
|
|
|
|
|
|
|
|
const params = [...DefaultLogParams, `--follow`]; |
|
|
const params = [...DefaultLogParams, `--follow`]; |
|
|
if (maxCount) { |
|
|
|
|
|
|
|
|
if (maxCount && !reverse) { |
|
|
params.push(`-n${maxCount}`); |
|
|
params.push(`-n${maxCount}`); |
|
|
} |
|
|
} |
|
|
if (sha) { |
|
|
if (sha) { |
|
|
if (reverse) { |
|
|
if (reverse) { |
|
|
|
|
|
params.push(`--reverse`); |
|
|
|
|
|
params.push(`--ancestry-path`); |
|
|
params.push(`${sha}..HEAD`); |
|
|
params.push(`${sha}..HEAD`); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
@ -192,7 +194,7 @@ export default class Git { |
|
|
params.push(`-n${maxCount}`); |
|
|
params.push(`-n${maxCount}`); |
|
|
} |
|
|
} |
|
|
if (sha) { |
|
|
if (sha) { |
|
|
params.push(`${sha}^!`); |
|
|
|
|
|
|
|
|
params.push(sha); |
|
|
} |
|
|
} |
|
|
return gitCommand(repoPath, ...params); |
|
|
return gitCommand(repoPath, ...params); |
|
|
} |
|
|
} |
|
|