From bf697d86ceeaf6611d2ccd46f4eb54bfd659f121 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 19 Nov 2018 01:58:49 -0500 Subject: [PATCH] Adds -- before filename for better git handling --- src/git/git.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git/git.ts b/src/git/git.ts index edc254e..a390d5f 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -466,9 +466,8 @@ export class Git { if (options.ref2) { params.push(options.ref2); } - params.push('--', fileName); - return git({ cwd: repoPath }, ...params); + return git({ cwd: repoPath }, ...params, '--', fileName); } static fetch(repoPath: string, options: { all?: boolean; remote?: string } = {}) { @@ -632,6 +631,7 @@ export class Git { const data = await git( { cwd: repoPath, exceptionHandler: ignoreExceptionsHandler }, ...params, + '--', fileName ); return data === '' ? undefined : data.trim();