From fc87b9b0752f5167da03cc69f7774ef32a293fcc 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 35df5f540c..86af33e34a 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -1088,7 +1088,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)) {