git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org, Richard Hartmann <richih.mailinglist@gmail.com>
Subject: Re: [PATCH] Minor grammar fix in the 'Not a git repository' message
Date: Mon, 16 Feb 2009 15:33:56 -0800	[thread overview]
Message-ID: <7vd4diez2z.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <8787c5894e7831bbd1ace3b2fd6649f1362d4b78.1234825069u.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Mon, 16 Feb 2009 23:58:10 +0100 (CET)")

Johannes Schindelin <johannes.schindelin@gmx.de> writes:

> It might cause less head-scratching to say 'nor any of the parent
> directories' than 'or ...' after saying that this is not a git
> repository.
> ...
> +			die("Not a git repository (nor any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT);
>  		}
>  		if (chdir(".."))
>  			die("Cannot change to %s/..: %s", cwd, strerror(errno));

The grammar may be more correct, but I wonder if the parenthesised part is
adding any value to the message or instead it is making the message more
confusing.

You will get this message when you are in /a/b/c/d and no .git
subdirectory was found in /a/b/c/d, nor in /a/b/c, nor in /a/b,...

But the message sounds as if the command expected ".git" to be either (1)
a git repository (which is false, because ".git" would mean /a/b/c/d/.git
and there is no git repository there), or (2) a parent directory (of
something unspecified, but a natural interpretation is "where you are"),
i.e. "I wanted you to be somewhere inside .git".  That obviously is not
what you wanted to say.

    "No git repository ".git" found here nor in any of the parent directories"

might be an improvement, though.

  parent reply	other threads:[~2009-02-16 23:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1234825069u.git.johannes.schindelin@gmx.de>
2009-02-16 22:58 ` [PATCH] Minor grammar fix in the 'Not a git repository' message Johannes Schindelin
2009-02-16 23:27   ` Wincent Colaiuta
2009-02-16 23:33   ` Junio C Hamano [this message]
2009-02-17  0:17     ` [PATCH] " Nicolas Sebrecht
2009-02-17  0:51       ` Junio C Hamano
2009-02-17  3:16         ` Boyd Stephen Smith Jr.
2009-02-17  9:29           ` Jakub Narebski
2009-02-17  8:50         ` Lars Noschinski

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=7vd4diez2z.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=richih.mailinglist@gmail.com \
    /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).