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

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

From
MAMohamed Akram <mohd.akram@outlook.com>
Date
Aug 23, 2022, 20:03 UTC
Message-ID
<A01F00AA-B96E-40EF-9017-9005A8AC1E14@outlook.com>
In-Reply-To
<xmqq5yikcbd1.fsf@gitster.g>

I haven’t tried it but that patch seems to make sense to me, although I found another related issue so it might need tweaking. When running `git diff` in a repo owned by another user, the warning message says that this is not a git repository, instead of the warning shown by other git commands about "dubious ownership". To reproduce:

sudo mkdir repo cd repo sudo git init git diff

Previous: Junio C Hamano
Message 3 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.