Merge branch 'maint-1.8.5' into maint
[gitweb.git] / builtin / grep.c
index 69ac2d8797ec32dc206425db0a2f3d7356810cfe..b8d440d0e099543d1b05de0dbb13cb4f8d32da29 100644 (file)
@@ -874,6 +874,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                if (len > 4 && is_dir_sep(pager[len - 5]))
                        pager += len - 4;
 
+               if (opt.ignore_case && !strcmp("less", pager))
+                       string_list_append(&path_list, "-I");
+
                if (!strcmp("less", pager) || !strcmp("vi", pager)) {
                        struct strbuf buf = STRBUF_INIT;
                        strbuf_addf(&buf, "+/%s%s",