git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Federico Lucifredi <federico@canonical.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org
Subject: Re: Git Bug report
Date: Wed, 05 Oct 2011 14:32:40 -0400	[thread overview]
Message-ID: <1317839560.20904.20.camel@skyplex> (raw)
In-Reply-To: <4E8BF519.8090509@viscovery.net>

On Wed, 2011-10-05 at 08:11 +0200, Johannes Sixt wrote:
> >> 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".

> >> 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

  parent reply	other threads:[~2011-10-05 18:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-04 21:24 Git Bug report Federico Lucifredi
2011-10-05  6:11 ` Johannes Sixt
2011-10-05  8:17   ` [PATCH] Report errors related to .git access during repository discovery Nguyễn Thái Ngọc Duy
2011-10-05 18:32   ` Federico Lucifredi [this message]
2011-10-05  7:22 ` Git Bug report Fredrik Gustafsson
2011-10-05 16:49   ` Junio C Hamano
2011-10-05 21:56     ` Nguyen Thai Ngoc Duy
2011-10-06  0:33     ` SZEDER Gábor
2011-10-06  0:44       ` Junio C Hamano
2011-10-06  1:09         ` SZEDER Gábor
     [not found]           ` <CABURp0qCsKG2oOxLw4BfU8UM=9V+pigd69ZK=TZVwetBPqjuiA@mail.gmail.com>
2011-10-06 16:22             ` Junio C Hamano
2011-10-06 16:26               ` Matthieu Moy
2011-10-06 16:54               ` Phil Hord
2011-10-06 22:57               ` Aaron Schrab
2011-10-06 16:48           ` Phil Hord
2022-04-14  7:22 Git Bug Report Randall Alfaro
2022-10-10 23:09 Git bug report Camden Narzt
2023-08-04 16:46 git " Paul Watson
2023-08-04 17:28 ` rsbecker
2023-08-08 17:07 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317839560.20904.20.camel@skyplex \
    --to=federico@canonical.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).