Re: git diff: support "-U" and "--unified" options properly
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:26
Linus Torvalds [off-list ref] writes:
On Sun, 14 May 2006, Junio C Hamano wrote:quoted
I am not either after seeing your numbers and trying them myself. I was going to look at it myself over the weekend, but I ended up spending most of the time migrating my environment, so no progress on that front yet. Sorry.I was looking at it, and I just suspect that "grep" is very optimized. At the same time, the built-in one had many good features, notably that you could grep the cached copy and from a specific version. So I think it makes sense. ... Except for testing, and fixing my stupid bugs, which I'm too lazy to do.
The command line flags needs to be unparsed before feeding the external grep.
The whole "exec_grep()" should basically be the same as "spawn_prog()". You get the idea. Anybody?
I think somebody wanted to have his own funky grep spawned off from his PATH, so I'd leave that to him (or her I do not remember which) ;-).