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

`git grep` is too picky about option parsing

From
Jan Engelhardt <jengelh@inai.de>
Date
Dec 6, 2020, 22:12 UTC
Message-ID
<704q5rs6-63q1-sp78-9845-227oq8q42o8q@vanv.qr>
Version: 2.29.2

-e, -i, -l and -n are all valid options for grep as well as git grep, yet git-grep refuses to operate if they appear in a specific order.

Observed:

$ git grep -e abc -lin error: did you mean `--lin` (with two dashes)?

Expected:

$ git grep -e abc -lin somefile

Next: Jeff King
Message 1 of 5 in “`git grep` is too picky about option parsing”
  1. Jan EngelhardtDec 6, 2020
  2. Jeff KingDec 7, 2020
  3. Junio C HamanoDec 7, 2020
  4. Jeff KingDec 7, 2020
  5. Junio C HamanoDec 7, 2020

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.