Skip to content

Commit d980c7b

Browse files
committed
Fixes #1139 - Git crash with v2.29.x
1 parent 6cfd9fd commit d980c7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/git/git.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ export namespace Git {
771771
if (limit && !reverse) {
772772
params.push(`-n${limit}`);
773773
}
774-
params.push(renames ? '--follow' : '-m');
774+
params.push(startLine == null && renames ? '--follow' : '-m');
775775

776776
if (filters != null && filters.length !== 0) {
777777
params.push(`--diff-filter=${filters.join(emptyStr)}`);
@@ -801,8 +801,8 @@ export namespace Git {
801801
}
802802
}
803803

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

0 commit comments

Comments
 (0)