git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-grep documentation

From
Junio C Hamano <junkio@cox.net>
Date
Jan 21, 2006, 19:06 UTC
Message-ID
<7vzmlpo0y4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<BAYC1-PASMTP031BAB23C3237DA15F88D3AE1E0@CEZ.ICE>
sean <seanlkml@sympatico.ca> writes:
> So your new patch should also fix that comment to remove the 
> "(or flags)" portion.
Probably.
> Since you comment on the -- marker here I think it should
> also appear in the command line above:
>
> 'git-grep' [<option>...] [-e] <pattern> [--] [<path>...]

I've thought about this but it is not any more correct than what we have now (both are technically incorrect). If you do not use an `-e` and let a non-option terminate the option processing, double dashes are not removed, so you do not want it there.

> Instead it is more useful for them to be told _specificly_ which 
> git-ls-files options  are available and that all others will be 
> passed to grep.   Somthing like:
I like it.
> ...    Your patch fixes the problem case and 
> there is no reason now to warn the user away from supplying the --
> marker in addition to the "-e"; it'll work properly in either case.

Does it? I think if you give -- without -e it will look for a path that matches -- because we pass our own -- to ls-files.

> That's it and the rest looked good.  In case you agree with anything
> i've said here, find an amended version of your patch below.
Thanks.

When people make an improvement proposal, I'd often prefer to see a patch that is on top of the patch being discussed, not a replacement.

Previous: seanNext: sean
Message 4 of 5 in “git-grep documentation”
  1. seanJan 20, 2006
  2. Junio C HamanoJan 21, 2006
  3. seanJan 21, 2006
  4. Junio C HamanoJan 21, 2006
  5. seanJan 21, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.