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 <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2011-02-17 16:09:10 +01:00
parent 81c5a08574
commit a3fc7b6164

View file

@ -1067,7 +1067,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)) {