瀏覽代碼

Fixes issues w/ quotes and commit search

main
Eric Amodio 2 年之前
父節點
當前提交
b71b309964
共有 1 個檔案被更改,包括 7 行新增3 行删除
  1. +7
    -3
      src/git/providers/localGitProvider.ts

+ 7
- 3
src/git/providers/localGitProvider.ts 查看文件

@ -1795,7 +1795,9 @@ export class LocalGitProvider implements GitProvider, Disposable {
searchArgs.add('--all-match');
}
for (const value of values) {
searchArgs.add(`--grep=${value.replace(doubleQuoteRegex, '\\b')}`);
searchArgs.add(
`--grep=${value.replace(doubleQuoteRegex, search.matchRegex ? '\\b' : '')}`,
);
}
break;
@ -1803,14 +1805,16 @@ export class LocalGitProvider implements GitProvider, Disposable {
case 'author:':
searchArgs.add('-m');
for (const value of values) {
searchArgs.add(`--author=${value.replace(doubleQuoteRegex, '\\b')}`);
searchArgs.add(
`--author=${value.replace(doubleQuoteRegex, search.matchRegex ? '\\b' : '')}`,
);
}
break;
case 'change:':
for (const value of values) {
searchArgs.add(`-G${value}`);
searchArgs.add(`-G${value.replace(doubleQuoteRegex, '')}`);
}
break;

Loading…
取消
儲存