Skip to content

Commit

Permalink
Stops including -m when using --follow
Browse files Browse the repository at this point in the history
Avoids bogus merge commits in file history when following renames
  • Loading branch information
eamodio committed Apr 9, 2019
1 parent a49eab6 commit 37a7f8b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/git/git.ts
Expand Up @@ -651,14 +651,11 @@ export class Git {
) {
const [file, root] = Git.splitPath(fileName, repoPath);

const params = [...defaultLogParams, '-m'];
const params = [...defaultLogParams];
if (options.maxCount && !options.reverse) {
params.push(`-n${options.maxCount}`);
}

if (options.renames) {
params.push('--follow');
}
params.push(options.renames ? '--follow' : '-m');

if (options.ref && !Git.isStagedUncommitted(options.ref)) {
if (options.reverse) {
Expand Down

0 comments on commit 37a7f8b

Please sign in to comment.