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

No "invalid option" message with git diff --cached --invalid-option

From
Simon Ruderich <simon@ruderich.org>
Date
Jun 22, 2017, 12:44 UTC
Message-ID
<20170622124458.ilokr7acas2bzq4z@ruderich.org>
Hello,

I'm using Git 2.13.1 (from the Debian sid repository) and noticed the following issue when upgrading.

    $ git diff --compaction-heuristic
    error: invalid option: --compaction-heuristic
    $ git diff --cached --compaction-heuristic
    usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]

I know that --compaction-heuristic is no longer supported but I was using it an alias and was confused that I got no proper error message warning me which option was wrong.

It seems to happen for any invalid option which is used in combination with --cached or --staged.

Regards Simon

-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
Next: Jeff King
Message 1 of 2 in “No "invalid option" message with git diff --cached --invalid-option”
  1. Simon RuderichJun 22, 2017
  2. Jeff KingJun 22, 2017

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.