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

Re: git-grep: option parsing conflicts with prefix-dash searches

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 8, 2010, 01:06 UTC
Message-ID
<7vljf41qoq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100207044415.GA6622@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Here it is with a commit message and some tests. While it is a minor
> change, we are pretty late in the release cycle, so perhaps it is best
> to leave it post-1.7.0 just to be on the safe side.

Your explanation that "-- marks the end of options" makes perfect sense and it is not inconsistent with what we do either. "grep" is an oddball that among its non-option arguments the first one _can_ be a non-path (namely, the single pattern you are looking for), but with your patch, that logic is nicely expressed, too.

I am tempted to push it into 1.7.0 but I'd keep it in 'next' for now.
Thanks.
Previous: Jeff King
Message 12 of 12 in “git-grep: option parsing conflicts with prefix-dash searches”
  1. Jan EngelhardtFeb 5, 2010
  2. Jan EngelhardtFeb 5, 2010
  3. Santi BéjarFeb 5, 2010
  4. Junio C HamanoFeb 5, 2010
  5. Junio C HamanoFeb 5, 2010
  6. Jeff KingFeb 6, 2010
  7. Junio C HamanoFeb 6, 2010
  8. Miles BaderFeb 6, 2010
  9. Jeff KingFeb 6, 2010
  10. Junio C HamanoFeb 6, 2010
  11. Jeff KingFeb 7, 2010
  12. Junio C HamanoFeb 8, 2010

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.