Re: [PATCH] Minor grammar fix in the 'Not a git repository' message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <johannes.schindelin@xxxxxx> 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.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux