Merge branch 'jc/maint-log-grep-all-match'
authorJunio C Hamano <gitster@pobox.com>
Tue, 18 Sep 2012 21:37:53 +0000 (14:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Sep 2012 21:37:54 +0000 (14:37 -0700)
Fix a long-standing bug in "git log --grep" when multiple "--grep"
are used together with "--all-match" and "--author" or "--committer".

* jc/maint-log-grep-all-match:
  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

1  2 
Documentation/rev-list-options.txt
builtin/grep.c
grep.h
revision.c
t/t7810-grep.sh

Simple merge
diff --cc builtin/grep.c
index 09ca4c980e633895dd104307e76770da3f208a06,a7e8df0d409fd431b71d1458cde6252ae119bf18..82530a61b483738382c810bcb141e33b06729d6f
@@@ -814,16 -770,19 +815,19 @@@ int cmd_grep(int argc, const char **arg
                  PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH,
                  close_callback },
                OPT__QUIET(&opt.status_only,
 -                         "indicate hit with exit status without output"),
 +                         N_("indicate hit with exit status without output")),
                OPT_BOOLEAN(0, "all-match", &opt.all_match,
 -                      "show only matches from files that match all patterns"),
 +                      N_("show only matches from files that match all patterns")),
+               { OPTION_SET_INT, 0, "debug", &opt.debug, NULL,
 -                "show parse tree for grep expression",
++                N_("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",
 +                      N_("pager"), N_("show matching files in the pager"),
                        PARSE_OPT_OPTARG, NULL, (intptr_t)default_pager },
                OPT_BOOLEAN(0, "ext-grep", &external_grep_allowed__ignored,
 -                          "allow calling of grep(1) (ignored by this build)"),
 -              { OPTION_CALLBACK, 0, "help-all", &options, NULL, "show usage",
 +                          N_("allow calling of grep(1) (ignored by this build)")),
 +              { OPTION_CALLBACK, 0, "help-all", &options, NULL, N_("show usage"),
                  PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },
                OPT_END()
        };
diff --cc grep.h
Simple merge
diff --cc revision.c
Simple merge
diff --cc t/t7810-grep.sh
Simple merge