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

Re: Odd "git diff" breakage

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 31, 2014, 18:30 UTC
Message-ID
<xmqq7g7a6x0g.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CA+55aFxYBDXs8mGQ3weR2PSOdMgOzMXPT=uWstL4c4BKnykkdA@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 16 quoted lines
> I hit this oddity when not remembering the right syntax for --color-words..
>
> Try this (outside of a git repository):
>
>    touch a b
>    git diff -u --color=words a b
>
> and watch it scroll (infinitely) printing out
>
>    error: option `color' expects "always", "auto", or "never"
>
> forever.
>
> I haven't tried to root-cause it, since I'm supposed to be merging stuff..
>
>                 Linus

Hmph, interesting. "outside a repository" is the key, it seems. And I can see it all the way down to 1.7.3 (at least).

Previous: Linus TorvaldsNext: Linus Torvalds
Message 2 of 6 in “Odd "git diff" breakage”
  1. Linus TorvaldsMar 31, 2014
  2. Junio C HamanoMar 31, 2014
  3. Linus TorvaldsMar 31, 2014
  4. Junio C HamanoMar 31, 2014
  5. diff-no-index: correctly diagnose error return from diff_opt_parse()Junio C Hamano, Mar 31, 2014
  6. Linus TorvaldsMar 31, 2014

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.