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

git diff prints long usage help if not run in git repo

From
MAMohamed Akram <mohd.akram@outlook.com>
Date
Aug 22, 2022, 18:22 UTC
Message-ID
<A2326287-9808-4479-95C5-E54979E21F95@outlook.com>
When running `git diff` in a directory that’s not a git repo, it prints a warning that this is the case, followed by a very long help text that, on your average terminal, causes it to scroll so much that the warning isn’t even visible. It should only print the warning and nothing else like other git commands. This was tested with git version 2.37.2 on macOS.
Next: Junio C Hamano
Message 1 of 3 in “git diff prints long usage help if not run in git repo”
  1. Mohamed AkramAug 22, 2022
  2. Junio C HamanoAug 22, 2022
  3. Mohamed AkramAug 23, 2022

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.