aboutsummaryrefslogtreecommitdiff
path: root/grep.h
Commit message (Collapse)AuthorAge
* grep --all-matchJunio C Hamano2006-09-27
| | | | | | | | | | | | | | | | | | This lets you say: git grep --all-match -e A -e B -e C to find lines that match A or B or C but limit the matches from the files that have all of A, B and C. This is different from git grep -e A --and -e B --and -e C in that the latter looks for a single line that has all of these at the same time. Signed-off-by: Junio C Hamano <junkio@cox.net>
* grep: free expressions and patterns when done.Junio C Hamano2006-09-27
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update grep internal for grepping only in head/bodyJunio C Hamano2006-09-20
| | | | | | | | This further updates the built-in grep engine so that we can say something like "this pattern should match only in head". This can be used to simplify grepping in the log messages. Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-grep: make pieces of it available as library.Junio C Hamano2006-09-20
This makes three functions and associated option structures from builtin-grep available from other parts of the system. * options to drive built-in grep engine is stored in struct grep_opt; * pattern strings and extended grep expressions are added to struct grep_opt with append_grep_pattern(); * when finished calling append_grep_pattern(), call compile_grep_patterns() to prepare for execution; * call grep_buffer() to find matches in the in-core buffer. This also adds an internal option "status_only" to grep_opt, which suppresses any output from grep_buffer(). Callers of the function as library can use it to check if there is a match without producing any output. Signed-off-by: Junio C Hamano <junkio@cox.net>