grep: error out if --untracked is used with --cached
authorMatheus Tavares <redacted>
Mon, 8 Feb 2021 19:43:28 +0000 (16:43 -0300)
committerJunio C Hamano <redacted>
Tue, 9 Feb 2021 20:39:06 +0000 (12:39 -0800)
commit0c5d83b2484c027971b793c442d147979c7e1a04
tree155254ee5db22a818e338212c2af5d51407a3275
parent773e25afc41b1b6533fa9ae2cd825d0b4a697fad
grep: error out if --untracked is used with --cached

The options --untracked and --cached are not compatible, but if they are
used together, grep just silently ignores --cached and searches the
working tree. Error out, instead, to avoid any potential confusion.

Signed-off-by: Matheus Tavares <redacted>
Reviewed-by: Elijah Newren <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/grep.c
git clone https://git.99rst.org/PROJECT