diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f87463..3b3d03e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed +- Fixes [1363](https://github.com/eamodio/vscode-gitlens/issues/1363) - Error 'Unable to open compare', when git setting log.showsignature is active - Fixes [1368](https://github.com/eamodio/vscode-gitlens/issues/1368) - Suppress message "GitLens was unable to find Git" ## [11.2.1] - 2021-02-02 diff --git a/src/git/git.ts b/src/git/git.ts index 8e982f2..3d0cb32 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -915,7 +915,12 @@ export namespace Git { params.push(ref); } - const data = await git({ cwd: repoPath, errors: GitErrorHandling.Ignore }, ...params, '--', fileName); + const data = await git( + { cwd: repoPath, configs: ['-c', 'log.showSignature=false'], errors: GitErrorHandling.Ignore }, + ...params, + '--', + fileName, + ); return data.length === 0 ? undefined : data.trim(); } @@ -925,13 +930,16 @@ export namespace Git { params.push('--', file); } - const data = await git({ cwd: repoPath, errors: GitErrorHandling.Ignore }, ...params); + const data = await git( + { cwd: repoPath, configs: ['-c', 'log.showSignature=false'], errors: GitErrorHandling.Ignore }, + ...params, + ); return data.length === 0 ? undefined : data.trim(); } export async function log__recent(repoPath: string) { const data = await git( - { cwd: repoPath, errors: GitErrorHandling.Ignore }, + { cwd: repoPath, configs: ['-c', 'log.showSignature=false'], errors: GitErrorHandling.Ignore }, 'log', '-n1', '--format=%H', @@ -942,7 +950,7 @@ export namespace Git { export async function log__recent_committerdate(repoPath: string) { const data = await git( - { cwd: repoPath, errors: GitErrorHandling.Ignore }, + { cwd: repoPath, configs: ['-c', 'log.showSignature=false'], errors: GitErrorHandling.Ignore }, 'log', '-n1', '--format=%ct', @@ -969,7 +977,11 @@ export namespace Git { params.push(`--skip=${skip}`); } - return git({ cwd: repoPath }, ...params, ...search); + return git( + { cwd: repoPath, configs: useShow ? undefined : ['-c', 'log.showSignature=false'] }, + ...params, + ...search, + ); } // export function log__shortstat(repoPath: string, options: { ref?: string }) { @@ -977,7 +989,7 @@ export namespace Git { // if (options.ref && !GitRevision.isUncommittedStaged(options.ref)) { // params.push(options.ref); // } - // return git({ cwd: repoPath }, ...params, '--'); + // return git({ cwd: repoPath, configs: ['-c', 'log.showSignature=false'] }, ...params, '--'); // } export async function ls_files( @@ -1041,7 +1053,7 @@ export namespace Git { params.push(branch); } - return git({ cwd: repoPath }, ...params, '--'); + return git({ cwd: repoPath, configs: ['-c', 'log.showSignature=false'] }, ...params, '--'); } export function remote(repoPath: string): Promise {