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

Re: Git Bug report

From
FLFederico Lucifredi <federico@canonical.com>
Date
Oct 5, 2011, 18:32 UTC
Message-ID
<1317839560.20904.20.camel@skyplex>
In-Reply-To
<4E8BF519.8090509@viscovery.net>
On Wed, 2011-10-05 at 08:11 +0200, Johannes Sixt wrote:
Show 6 quoted lines
> >> federico@skyplex:/etc$ git log
> >> fatal: Not a git repository (or any of the parent directories): .git
> > 
> > with correct access permissions, everything works as expected.
> 
> And the correct error message is...?

".git: permission denied" -- no need to be fatal (there could be ../.git, etc - fatal comes only if those don't exist).

It could fail silently if one of the parents exists, but in the fatal scenario, I should be told that it was by permission denied. Currently, I am told there is no git repo where I know there to be one, which means "what happened to my repo" is the next question in the user's head. "it's there but it is broke" is the subtext one gets from this error. it should be "it is there, I cannot get to it".

Show 10 quoted lines
> >> drwx------   8 root root      4096 2011-10-03 16:53 .git
> 
> Assuming that you expected something like this:
> 
> fatal: .git: permission denied
> 
> it is hard to argue that a directory that happens to be named .git, but
> was sealed by its owner should be assumed to be a git repository, albeit
> one that we do not have access to. "Not a git repository" is an equally
> justifyable error message, IMHO.

An error message should help resolve the error in question, not grade the user's smarts. Here I as a user had an expectation that there was a git repository for /etc ("I set up one!") and figured the permission issue with my own wits (well, I did not need to because it was /etc, but in the general perm-denied case I would have had to), by looking at the dir because the message gave me no useful information on the cause of the problem.

Thanks -Federico
-- 
_________________________________________
-- "'Problem' is a bleak word for challenge" - Richard Fish
(Federico L. Lucifredi) - federico at canonical.com - GnuPG 0x4A73884C
Previous: Nguyễn Thái Ngọc DuyNext: Fredrik Gustafsson
Message 4 of 15 in “Git Bug report”
  1. Federico LucifrediOct 4, 2011
  2. Johannes SixtOct 5, 2011
  3. Report errors related to .git access during repository discoveryNguyễn Thái Ngọc Duy, Oct 5, 2011
  4. Federico LucifrediOct 5, 2011
  5. Fredrik GustafssonOct 5, 2011
  6. Junio C HamanoOct 5, 2011
  7. Nguyen Thai Ngoc DuyOct 5, 2011
  8. SZEDER GáborOct 6, 2011
  9. Junio C HamanoOct 6, 2011
  10. SZEDER GáborOct 6, 2011
  11. Phil HordOct 6, 2011
  12. Junio C HamanoOct 6, 2011
  13. Matthieu MoyOct 6, 2011
  14. Phil HordOct 6, 2011
  15. Aaron SchrabOct 6, 2011

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.