Skip to content

Commit

Permalink
Fixes #1139 - Git crash with v2.29.x
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Nov 3, 2020
1 parent 6cfd9fd commit d980c7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/git/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ export namespace Git {
if (limit && !reverse) {
params.push(`-n${limit}`);
}
params.push(renames ? '--follow' : '-m');
params.push(startLine == null && renames ? '--follow' : '-m');

if (filters != null && filters.length !== 0) {
params.push(`--diff-filter=${filters.join(emptyStr)}`);
Expand Down Expand Up @@ -801,8 +801,8 @@ export namespace Git {
}
}

if (startLine == null || renames) {
// Don't specify a file spec when using a line number (so say the git docs), unless it is a follow
if (startLine == null) {
// Don't specify a file spec when using a line number (so say the git docs)
params.push('--', file);
}

Expand Down

0 comments on commit d980c7b

Please sign in to comment.