On Wed, 16 Jul 2008, Chris Cowan wrote:The grep selection at compile time is purely a choice between "no external grep at all" and "whatever external grep is in $PATH". exec_grep() literally does .. pid = fork(); if (pid < 0) return pid; if (!pid) { execvp("grep", (char **) argv); exit(255); } .. so you can choose your version of external grep at run-time by just setting PATH appropriately. Or you can just decide that you don't want to use any external grep binary at all, which is the compile-time choice of NO_EXTERNAL_GREP. In that case, git will do the grep implementation all internally. It can do so, but then it relies on the regex() library which is often less optimized than the external grep. Note the "often". It's possible that the external grep is never worth it, in which case you should use NO_EXTERNAL_GREP. GNU grep happens to be very good. Even with an external grep configured in, you'll end up using the internal one for the case where you ask for the index information ("--cached") or when you ask for a particular version of the tree rather than the checked-out tree. So regardless, you'll fall back to the internal version for some things. Linus -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Jeremy Fitzhardinge | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Mike Galbraith | Re: regression: CD burning (k3b) went broke |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| Michael Grollman | Re: 8169 Intermittent ifup Failure Issue With RTL8102E Chipset in Intel's New D945... |
