diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-29 22:30:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-29 22:30:56 -0700 |
commit | 31d69db340d3d056668cbc278abf01a0a552d9b4 (patch) | |
tree | 932086eb0528a96e17d908e5528e33758462f9e3 /builtin | |
parent | 52938b113b4dd09bae869326d4993a7b998e6877 (diff) | |
parent | 3083301ead459a45059af3ee85fb51d5d737a74d (diff) | |
download | git-31d69db340d3d056668cbc278abf01a0a552d9b4.tar.gz |
Merge branch 'jc/maint-log-grep-all-match-1' into maint
* jc/maint-log-grep-all-match-1:
grep.c: make two symbols really file-scope static this time
t7810-grep: test --all-match with multiple --grep and --author options
t7810-grep: test interaction of multiple --grep and --author options
t7810-grep: test multiple --author with --all-match
t7810-grep: test multiple --grep with and without --all-match
t7810-grep: bring log --grep tests in common form
grep.c: mark private file-scope symbols as static
log: document use of multiple commit limiting options
log --grep/--author: honor --all-match honored for multiple --grep patterns
grep: show --debug output only once
grep: teach --debug option to dump the parse tree
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/grep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 29adb0ac93..0654e0b0f6 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -209,6 +209,7 @@ static void start_threads(struct grep_opt *opt) int err; struct grep_opt *o = grep_opt_dup(opt); o->output = strbuf_out; + o->debug = 0; compile_grep_patterns(o); err = pthread_create(&threads[i], NULL, run, o); @@ -772,6 +773,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix) "indicate hit with exit status without output"), OPT_BOOLEAN(0, "all-match", &opt.all_match, "show only matches from files that match all patterns"), + { OPTION_SET_INT, 0, "debug", &opt.debug, NULL, + "show parse tree for grep expression", + PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1 }, OPT_GROUP(""), { OPTION_STRING, 'O', "open-files-in-pager", &show_in_pager, "pager", "show matching files in the pager", |