Linus Torvalds <torvalds@xxxxxxxx> writes: > [ Junio - see the "grep" issue ] > ... > Of course, I don't think anybody tried the new "git grep" on Solaris,... I haven't tried the new grep on Solaris myself, as the Solaris box I have easy access is badly maintained (unmaintained is probably a better wording). > ...and > I think the solaris "grep" lacks the "-H" flag, for example. But that > should be easy to fix (for example, replace the use of "--" and "-H" with > putting a "/dev/null" as the first filename). You mean like this, I presume. But I think this approach breaks -L; I do not think Solaris supports -L, so it does not matter there, but on platforms that knows how to do -L it does. -- >8 -- [PATCH] builtin-grep: give /dev/null at the beginning instead of -H --- diff --git a/builtin-grep.c b/builtin-grep.c index 66111de..ff3c1f7 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -453,7 +453,6 @@ static int external_grep(struct grep_opt len = nr = 0; push_arg("grep"); - push_arg("-H"); if (opt->fixed) push_arg("-F"); if (opt->linenum) @@ -503,7 +502,7 @@ static int external_grep(struct grep_opt push_arg("-e"); push_arg(p->pattern); } - push_arg("--"); + push_arg("/dev/null"); hit = 0; argc = nr; - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html