MCPcopy Create free account
hub / github.com/go-git/go-git / Grep

Method Grep

worktree.go:961–963  ·  view source on GitHub ↗

Grep performs grep on a worktree.

(opts *GrepOptions)

Source from the content-addressed store, hash-verified

959
960// Grep performs grep on a worktree.
961func (w *Worktree) Grep(opts *GrepOptions) ([]GrepResult, error) {
962 return w.r.Grep(opts)
963}
964
965// findMatchInFiles takes a FileIter, worktree name and GrepOptions, and
966// returns a slice of GrepResult containing the result of regex pattern matching

Callers 2

TestGrepMethod · 0.45
TestGrepBareMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestGrepMethod · 0.36
TestGrepBareMethod · 0.36