class Git::Commands::Grep

Implements the ‘git grep` command

Searches for a pattern in the contents of tracked files within a repository tree.

@example Typical usage

grep = Git::Commands::Grep.new(execution_context)
grep.call('HEAD', pattern: 'search')
grep.call('HEAD', pattern: 'SEARCH', ignore_case: true)
grep.call('HEAD', pattern: 'search', invert_match: true)
grep.call('HEAD', pattern: 'foo|bar', extended_regexp: true)
grep.call('HEAD', pattern: 'search', pathspec: 'lib/**')

@note ‘arguments` block audited against

https://git-scm.com/docs/git-grep/2.53.0

@see git-scm.com/docs/git-grep git-grep

@see Git::Commands

@api private