Re: [PATCH] grep: do not do external grep on skip-worktree entries
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:57
Nguyen Thai Ngoc Duy [off-list ref] writes:
quoted
> +support_external_grep() { > + case "$(git grep -h 2>&1 >/dev/null|grep -e --ext-grep)" in > + *"(default)"*) return 0;; > + *"(ignored by this build)"*) return 1;; > + *) test_expect_success 'External grep check is broken' 'false';; > + esac > +} Heh, clever. git grep -h 2>&1 | grep 'allow calling of grep.*default' >/dev/null may be sufficient, though.Yes, until somebody changes help text in builtin-grep.c and all external grep tests become disable. I wanted to catch that case too.
Ok, that is a worthwhile thing to do. Then please at least make the second grep "grep ext-grep", droping "-e --" from it. We assume some implementation of external grep to lack "-e" (e.g. Solaris).