builtin/grep: add grep.fallbackToNoIndex config
authorThomas Gummerer <redacted>
Tue, 12 Jan 2016 10:40:26 +0000 (11:40 +0100)
committerJunio C Hamano <redacted>
Tue, 12 Jan 2016 18:54:31 +0000 (10:54 -0800)
commitecd9ba61778e436dde12f08781a12ad1149d5ebf
tree5d4415cd5ae4acbeabdd3bfcb1ec97494a299e77
parent1f5101aee2daa3459cf50f945da924afa78a8ced
builtin/grep: add grep.fallbackToNoIndex config

Currently when git grep is used outside of a git repository without the
--no-index option git simply dies.  For convenience, add a
grep.fallbackToNoIndex configuration variable.  If set to true, git grep
behaves like git grep --no-index if it is run outside of a git
repository.  It defaults to false, preserving the current behavior.

Helped-by: Jeff King <redacted>
Helped-by: Eric Sunshine <redacted>
Signed-off-by: Thomas Gummerer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Documentation/config.txt
Documentation/git-grep.txt
builtin/grep.c
t/t7810-grep.sh
git clone https://git.99rst.org/PROJECT