Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'sk/spawn-less-case-insensitively-from-grep-O-i'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 6 Jun 2014 18:32:49 +0000
(11:32 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 6 Jun 2014 18:32:49 +0000
(11:32 -0700)
* sk/spawn-less-case-insensitively-from-grep-O-i:
git grep -O -i: if the pager is 'less', pass the '-I' option
builtin/grep.c
patch
|
blob
|
history
raw
(from parent 1:
7173ad7
)
diff --git
a/builtin/grep.c
b/builtin/grep.c
index 43af5b744fcbeef343672637b3e9058014b6353c..c86a142f308d614daefd459fd9f9ddebe03f4cb8 100644
(file)
--- a/
builtin/grep.c
+++ b/
builtin/grep.c
@@
-872,6
+872,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",