Merge pull request 'git-grep: fix for initial dashes in expressions' (#4967) from yoctozepto/git-grep-fix-words into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4967 Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
This commit is contained in:
commit
fbb2252314
4 changed files with 45 additions and 1 deletions
|
@ -76,7 +76,7 @@ func GrepSearch(ctx context.Context, repo *Repository, search string, opts GrepO
|
|||
words = strings.Fields(search)
|
||||
}
|
||||
for _, word := range words {
|
||||
cmd.AddOptionValues("-e", strings.TrimLeft(word, "-"))
|
||||
cmd.AddGitGrepExpression(word)
|
||||
}
|
||||
|
||||
// pathspec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue