Bläddra i källkod

Attempts to address #1213, #1219

main
Eric Amodio 4 år sedan
förälder
incheckning
b544895789
2 ändrade filer med 10 tillägg och 5 borttagningar
  1. +9
    -5
      src/git/git.ts
  2. +1
    -0
      src/git/gitService.ts

+ 9
- 5
src/git/git.ts Visa fil

@ -834,16 +834,20 @@ export namespace Git {
params.push('--all');
}
params.push(renames && startLine == null && all !== true ? '--follow' : '-m');
if (filters != null && filters.length !== 0) {
params.push(`--diff-filter=${filters.join(emptyStr)}`);
// Can't allow rename detection (`--follow`) if `all` or a `startLine` is specified
if (renames && (all || startLine != null)) {
renames = false;
}
if ((all !== true && renames) || firstParent) {
params.push(renames ? '--follow' : '-m');
if (/*renames ||*/ firstParent) {
params.push('--first-parent');
}
if (filters != null && filters.length !== 0) {
params.push(`--diff-filter=${filters.join(emptyStr)}`);
}
if (format !== 'refs') {
if (startLine == null) {
if (format === 'simple') {

+ 1
- 0
src/git/gitService.ts Visa fil

@ -2189,6 +2189,7 @@ export class GitService implements Disposable {
const data = await Git.log__file(root, file, ref, {
...options,
firstParent: options.renames,
startLine: range == null ? undefined : range.start.line + 1,
endLine: range == null ? undefined : range.end.line + 1,
});

Laddar…
Avbryt
Spara