Merge branch 'bc/object-id'
[gitweb.git] / builtin / grep.c
index 4063882f06536ad5b3f1292a5b66e534ad4688af..d04f4400d9db8ef9f0b0dde0c8be46a11bd0e2f7 100644 (file)
@@ -20,7 +20,7 @@
 #include "pathspec.h"
 
 static char const * const grep_usage[] = {
-       N_("git grep [options] [-e] <pattern> [<rev>...] [[--] <path>...]"),
+       N_("git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]"),
        NULL
 };
 
@@ -641,7 +641,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                OPT_BOOL(0, "untracked", &untracked,
                        N_("search in both tracked and untracked files")),
                OPT_SET_INT(0, "exclude-standard", &opt_exclude,
-                           N_("search also in ignored files"), 1),
+                           N_("ignore files specified via '.gitignore'"), 1),
                OPT_GROUP(""),
                OPT_BOOL('v', "invert-match", &opt.invert,
                        N_("show non-matching lines")),
@@ -738,7 +738,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                        PARSE_OPT_OPTARG, NULL, (intptr_t)default_pager },
                OPT_BOOL(0, "ext-grep", &external_grep_allowed__ignored,
                         N_("allow calling of grep(1) (ignored by this build)")),
-               { OPTION_CALLBACK, 0, "help-all", &options, NULL, N_("show usage"),
+               { OPTION_CALLBACK, 0, "help-all", NULL, NULL, N_("show usage"),
                  PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },
                OPT_END()
        };
@@ -885,7 +885,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                }
        }
 
-       if (!show_in_pager)
+       if (!show_in_pager && !opt.status_only)
                setup_pager();
 
        if (!use_index && (untracked || cached))