Merge branch 'rs/find-pack-entry-bisection' into maint
[gitweb.git] / grep.c
diff --git a/grep.c b/grep.c
index 11a86548d6504e397c0e219aa2318b6cddd4f163..c9e7cc735681ed4c670abd7f319336204391173b 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -593,7 +593,7 @@ static void compile_fixed_regexp(struct grep_pat *p, struct grep_opt *opt)
 {
        struct strbuf sb = STRBUF_INIT;
        int err;
-       int regflags = REG_NEWLINE;
+       int regflags = 0;
 
        basic_regex_quote_buf(&sb, p->pattern);
        if (opt->ignore_case)
@@ -1821,7 +1821,7 @@ static int grep_source_1(struct grep_opt *opt, struct grep_source *gs, int colle
                return 0;
 
        if (opt->status_only)
-               return 0;
+               return opt->unmatch_name_only;
        if (opt->unmatch_name_only) {
                /* We did not see any hit, so we want to show this */
                show_name(opt, gs->name);