Git development
 help / color / mirror / Atom feed
* Fix silly typo in new builtin grep
@ 2006-05-16  0:54 Linus Torvalds
  2006-05-16  1:07 ` Linus Torvalds
  2006-05-16  3:18 ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Linus Torvalds @ 2006-05-16  0:54 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List


The "-F" flag apparently got mis-translated due to some over-eager 
copy-paste work into a duplicate "-H" when using the external grep.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---

Me likee the new built-in grep. The ability to say

	git grep __make_request v2.6.13 -- '*.c'

to grep for it in a specific version is well worth the fact that it 
obviously ends up being slower than grepping in the currently checked-out 
tree. It's doing a hell of a lot more, but despite that it's not at all 
that slow.

(In fact, I would say that doing the above command in just 4 seconds is 
damn impressive - it's a large code-base, and v2.6.13 is several months, 
and over 20 _thousand_ revisions ago).

And now it doesn't have any performance downsides, so it's all upside. 

Good job. Pls merge into mainline, I think the "grep per revision" is a 
killer feature.

diff --git a/builtin-grep.c b/builtin-grep.c
index 3d6e515..66111de 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -455,7 +455,7 @@ static int external_grep(struct grep_opt
 	push_arg("grep");
 	push_arg("-H");
 	if (opt->fixed)
-		push_arg("-H");
+		push_arg("-F");
 	if (opt->linenum)
 		push_arg("-n");
 	if (opt->regflags & REG_EXTENDED)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-16  3:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-16  0:54 Fix silly typo in new builtin grep Linus Torvalds
2006-05-16  1:07 ` Linus Torvalds
2006-05-16  2:10   ` Morten Welinder
2006-05-16  3:27     ` Linus Torvalds
2006-05-16  3:18 ` Junio C Hamano
2006-05-16  3:32   ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox