Sfoglia il codice sorgente

Fixes issues w/ quotes and commit search

main
Eric Amodio 2 anni fa
parent
commit
b71b309964
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. +7
    -3
      src/git/providers/localGitProvider.ts

+ 7
- 3
src/git/providers/localGitProvider.ts Vedi File

@ -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;

Caricamento…
Annulla
Salva