From a3eb612f706cc4cfcd36768a203efecf5ef2d716 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 17 Feb 2011 16:09:10 +0100 Subject: [PATCH] Amend "git grep -O -i: if the pager is 'less', pass the '-i' option" This change was left in the stash, for some reason. Squash this in with the next rebasing merge. Signed-off-by: Johannes Schindelin --- builtin/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/grep.c b/builtin/grep.c index 63b00f8fab..b18491bc8c 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -1083,7 +1083,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) if (len > 4 && is_dir_sep(pager[len - 5])) pager += len - 4; - if (!strcmp("less", pager)) + if (opt.ignore_case && !strcmp("less", pager)) string_list_append(&path_list, "-i"); if (!strcmp("less", pager) || !strcmp("vi", pager)) { -- 2.11.4.GIT