]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/grep.c
Merge branch 'mt/grep-sparse-checkout'
[thirdparty/git.git] / builtin / grep.c
index bff214c7552663ea9fbb86a70d4bfdf3b3394a1c..4e91a253ac3b5fd0cdbd0436018c82fb45bde04c 100644 (file)
@@ -216,8 +216,6 @@ static void start_threads(struct grep_opt *opt)
                int err;
                struct grep_opt *o = grep_opt_dup(opt);
                o->output = strbuf_out;
-               if (i)
-                       o->debug = 0;
                compile_grep_patterns(o);
                err = pthread_create(&threads[i], NULL, run, o);
 
@@ -939,9 +937,6 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                           N_("indicate hit with exit status without output")),
                OPT_BOOL(0, "all-match", &opt.all_match,
                        N_("show only matches from files that match all patterns")),
-               OPT_SET_INT_F(0, "debug", &opt.debug,
-                             N_("show parse tree for grep expression"),
-                             1, PARSE_OPT_HIDDEN),
                OPT_GROUP(""),
                { OPTION_STRING, 'O', "open-files-in-pager", &show_in_pager,
                        N_("pager"), N_("show matching files in the pager"),
@@ -1160,6 +1155,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
        if (!use_index && (untracked || cached))
                die(_("--cached or --untracked cannot be used with --no-index"));
 
+       if (untracked && cached)
+               die(_("--untracked cannot be used with --cached"));
+
        if (!use_index || untracked) {
                int use_exclude = (opt_exclude < 0) ? use_index : !!opt_exclude;
                hit = grep_directory(&opt, &pathspec, use_exclude, use_index);