Browse Source

Adds -- before filename for better git handling

main
Eric Amodio 6 years ago
parent
commit
bf697d86ce
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/git/git.ts

+ 2
- 2
src/git/git.ts View File

@ -466,9 +466,8 @@ export class Git {
if (options.ref2) {
params.push(options.ref2);
}
params.push('--', fileName);
return git<string>({ cwd: repoPath }, ...params);
return git<string>({ cwd: repoPath }, ...params, '--', fileName);
}
static fetch(repoPath: string, options: { all?: boolean; remote?: string } = {}) {
@ -632,6 +631,7 @@ export class Git {
const data = await git<string>(
{ cwd: repoPath, exceptionHandler: ignoreExceptionsHandler },
...params,
'--',
fileName
);
return data === '' ? undefined : data.trim();

Loading…
Cancel
Save